Class: MistApi::OrgSettingMgmt

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

Overview

management-related properties

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(mxtunnel_ids = SKIP, use_mxtunnel = false, use_wxtunnel = false) ⇒ OrgSettingMgmt

Returns a new instance of OrgSettingMgmt.



48
49
50
51
52
53
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 48

def initialize(mxtunnel_ids = SKIP, use_mxtunnel = false,
               use_wxtunnel = false)
  @mxtunnel_ids = mxtunnel_ids unless mxtunnel_ids == SKIP
  @use_mxtunnel = use_mxtunnel unless use_mxtunnel == SKIP
  @use_wxtunnel = use_wxtunnel unless use_wxtunnel == SKIP
end

Instance Attribute Details

#mxtunnel_idsArray[UUID | String]

List of Mist Tunnels

Returns:

  • (Array[UUID | String])


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

def mxtunnel_ids
  @mxtunnel_ids
end

#use_mxtunnelTrueClass | FalseClass

Whether to use Mist Tunnel for mgmt connectivity, this takes precedence over use_wxtunnel

Returns:

  • (TrueClass | FalseClass)


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

def use_mxtunnel
  @use_mxtunnel
end

#use_wxtunnelTrueClass | FalseClass

Whether to use wxtunnel for mgmt connectivity

Returns:

  • (TrueClass | FalseClass)


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

def use_wxtunnel
  @use_wxtunnel
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  mxtunnel_ids = hash.key?('mxtunnel_ids') ? hash['mxtunnel_ids'] : SKIP
  use_mxtunnel = hash['use_mxtunnel'] ||= false
  use_wxtunnel = hash['use_wxtunnel'] ||= false

  # Create object from extracted values.
  OrgSettingMgmt.new(mxtunnel_ids,
                     use_mxtunnel,
                     use_wxtunnel)
end

.namesObject

A mapping from model property names to API property names.



26
27
28
29
30
31
32
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 26

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mxtunnel_ids'] = 'mxtunnel_ids'
  @_hash['use_mxtunnel'] = 'use_mxtunnel'
  @_hash['use_wxtunnel'] = 'use_wxtunnel'
  @_hash
end

.nullablesObject

An array for nullable fields



44
45
46
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 44

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    mxtunnel_ids
    use_mxtunnel
    use_wxtunnel
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



78
79
80
81
82
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 78

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} mxtunnel_ids: #{@mxtunnel_ids.inspect}, use_mxtunnel:"\
  " #{@use_mxtunnel.inspect}, use_wxtunnel: #{@use_wxtunnel.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



71
72
73
74
75
# File 'lib/mist_api/models/org_setting_mgmt.rb', line 71

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} mxtunnel_ids: #{@mxtunnel_ids}, use_mxtunnel: #{@use_mxtunnel},"\
  " use_wxtunnel: #{@use_wxtunnel}>"
end