Class: MistApi::OrgSettingCradlepoint

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

Overview

OrgSettingCradlepoint 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(cp_api_id = SKIP, cp_api_key = SKIP, ecm_api_id = SKIP, ecm_api_key = SKIP, enable_lldp = SKIP) ⇒ OrgSettingCradlepoint

Returns a new instance of OrgSettingCradlepoint.



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

def initialize(cp_api_id = SKIP, cp_api_key = SKIP, ecm_api_id = SKIP,
               ecm_api_key = SKIP, enable_lldp = SKIP)
  @cp_api_id = cp_api_id unless cp_api_id == SKIP
  @cp_api_key = cp_api_key unless cp_api_key == SKIP
  @ecm_api_id = ecm_api_id unless ecm_api_id == SKIP
  @ecm_api_key = ecm_api_key unless ecm_api_key == SKIP
  @enable_lldp = enable_lldp unless enable_lldp == SKIP
end

Instance Attribute Details

#cp_api_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def cp_api_id
  @cp_api_id
end

#cp_api_keyString

TODO: Write general description for this method

Returns:

  • (String)


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

def cp_api_key
  @cp_api_key
end

#ecm_api_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def ecm_api_id
  @ecm_api_id
end

#ecm_api_keyString

TODO: Write general description for this method

Returns:

  • (String)


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

def ecm_api_key
  @ecm_api_key
end

#enable_lldpTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def enable_lldp
  @enable_lldp
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/org_setting_cradlepoint.rb', line 69

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  cp_api_id = hash.key?('cp_api_id') ? hash['cp_api_id'] : SKIP
  cp_api_key = hash.key?('cp_api_key') ? hash['cp_api_key'] : SKIP
  ecm_api_id = hash.key?('ecm_api_id') ? hash['ecm_api_id'] : SKIP
  ecm_api_key = hash.key?('ecm_api_key') ? hash['ecm_api_key'] : SKIP
  enable_lldp = hash.key?('enable_lldp') ? hash['enable_lldp'] : SKIP

  # Create object from extracted values.
  OrgSettingCradlepoint.new(cp_api_id,
                            cp_api_key,
                            ecm_api_id,
                            ecm_api_key,
                            enable_lldp)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['cp_api_id'] = 'cp_api_id'
  @_hash['cp_api_key'] = 'cp_api_key'
  @_hash['ecm_api_id'] = 'ecm_api_id'
  @_hash['ecm_api_key'] = 'ecm_api_key'
  @_hash['enable_lldp'] = 'enable_lldp'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    cp_api_id
    cp_api_key
    ecm_api_id
    ecm_api_key
    enable_lldp
  ]
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/org_setting_cradlepoint.rb', line 95

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} cp_api_id: #{@cp_api_id.inspect}, cp_api_key: #{@cp_api_key.inspect},"\
  " ecm_api_id: #{@ecm_api_id.inspect}, ecm_api_key: #{@ecm_api_key.inspect}, enable_lldp:"\
  " #{@enable_lldp.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



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

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} cp_api_id: #{@cp_api_id}, cp_api_key: #{@cp_api_key}, ecm_api_id:"\
  " #{@ecm_api_id}, ecm_api_key: #{@ecm_api_key}, enable_lldp: #{@enable_lldp}>"
end