Class: MistApi::MxedgeUpgradeMultiAllowDowngrades

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

Overview

Whether downgrade is allowed when running version is higher than expected version for each service

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 = false, mxdas = false, mxocproxy = false, radsecproxy = false, tunterm = false) ⇒ MxedgeUpgradeMultiAllowDowngrades

Returns a new instance of MxedgeUpgradeMultiAllowDowngrades.



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

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

Instance Attribute Details

#mxagentTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


15
16
17
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 15

def mxagent
  @mxagent
end

#mxdasTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


19
20
21
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 19

def mxdas
  @mxdas
end

#mxocproxyTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


23
24
25
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 23

def mxocproxy
  @mxocproxy
end

#radsecproxyTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


27
28
29
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 27

def radsecproxy
  @radsecproxy
end

#tuntermTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


31
32
33
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 31

def tunterm
  @tunterm
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

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

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

.namesObject

A mapping from model property names to API property names.



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

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



56
57
58
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 56

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

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

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

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.



89
90
91
92
93
# File 'lib/mist_api/models/mxedge_upgrade_multi_allow_downgrades.rb', line 89

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