Class: MistApi::StatsSwitchVcSetupInfo

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

Overview

StatsSwitchVcSetupInfo 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(config_type = SKIP, current_stats = SKIP, err_missing_dev_id_fpc = SKIP, last_update = SKIP, request_time = SKIP, request_type = SKIP) ⇒ StatsSwitchVcSetupInfo

Returns a new instance of StatsSwitchVcSetupInfo.



65
66
67
68
69
70
71
72
73
74
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 65

def initialize(config_type = SKIP, current_stats = SKIP,
               err_missing_dev_id_fpc = SKIP, last_update = SKIP,
               request_time = SKIP, request_type = SKIP)
  @config_type = config_type unless config_type == SKIP
  @current_stats = current_stats unless current_stats == SKIP
  @err_missing_dev_id_fpc = err_missing_dev_id_fpc unless err_missing_dev_id_fpc == SKIP
  @last_update = last_update unless last_update == SKIP
  @request_time = request_time unless request_time == SKIP
  @request_type = request_type unless request_type == SKIP
end

Instance Attribute Details

#config_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def config_type
  @config_type
end

#current_statsString

TODO: Write general description for this method

Returns:

  • (String)


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

def current_stats
  @current_stats
end

#err_missing_dev_id_fpcTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


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

def err_missing_dev_id_fpc
  @err_missing_dev_id_fpc
end

#last_updateFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def last_update
  @last_update
end

#request_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def request_time
  @request_time
end

#request_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def request_type
  @request_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  config_type = hash.key?('config_type') ? hash['config_type'] : SKIP
  current_stats = hash.key?('current_stats') ? hash['current_stats'] : SKIP
  err_missing_dev_id_fpc =
    hash.key?('err_missing_dev_id_fpc') ? hash['err_missing_dev_id_fpc'] : SKIP
  last_update = hash.key?('last_update') ? hash['last_update'] : SKIP
  request_time = hash.key?('request_time') ? hash['request_time'] : SKIP
  request_type = hash.key?('request_type') ? hash['request_type'] : SKIP

  # Create object from extracted values.
  StatsSwitchVcSetupInfo.new(config_type,
                             current_stats,
                             err_missing_dev_id_fpc,
                             last_update,
                             request_time,
                             request_type)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['config_type'] = 'config_type'
  @_hash['current_stats'] = 'current_stats'
  @_hash['err_missing_dev_id_fpc'] = 'err_missing_dev_id_fpc'
  @_hash['last_update'] = 'last_update'
  @_hash['request_time'] = 'request_time'
  @_hash['request_type'] = 'request_type'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 49

def self.optionals
  %w[
    config_type
    current_stats
    err_missing_dev_id_fpc
    last_update
    request_time
    request_type
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



107
108
109
110
111
112
113
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 107

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} config_type: #{@config_type.inspect}, current_stats:"\
  " #{@current_stats.inspect}, err_missing_dev_id_fpc: #{@err_missing_dev_id_fpc.inspect},"\
  " last_update: #{@last_update.inspect}, request_time: #{@request_time.inspect},"\
  " request_type: #{@request_type.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



99
100
101
102
103
104
# File 'lib/mist_api/models/stats_switch_vc_setup_info.rb', line 99

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} config_type: #{@config_type}, current_stats: #{@current_stats},"\
  " err_missing_dev_id_fpc: #{@err_missing_dev_id_fpc}, last_update: #{@last_update},"\
  " request_time: #{@request_time}, request_type: #{@request_type}>"
end