Class: MistApi::SleImpactedAps

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

Overview

SleImpactedAps 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(aps = nil, classifier = nil, mend = nil, failure = nil, limit = nil, metric = nil, page = nil, start = nil, total_count = nil) ⇒ SleImpactedAps

Returns a new instance of SleImpactedAps.



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

def initialize(aps = nil, classifier = nil, mend = nil, failure = nil,
               limit = nil, metric = nil, page = nil, start = nil,
               total_count = nil)
  @aps = aps
  @classifier = classifier
  @mend = mend
  @failure = failure
  @limit = limit
  @metric = metric
  @page = page
  @start = start
  @total_count = total_count
end

Instance Attribute Details

#apsArray[SleImpactedApsAp]

TODO: Write general description for this method

Returns:



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

def aps
  @aps
end

#classifierString

TODO: Write general description for this method

Returns:

  • (String)


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

def classifier
  @classifier
end

#failureString

TODO: Write general description for this method

Returns:

  • (String)


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

def failure
  @failure
end

#limitFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def limit
  @limit
end

#mendFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def mend
  @mend
end

#metricString

TODO: Write general description for this method

Returns:

  • (String)


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

def metric
  @metric
end

#pageFloat

TODO: Write general description for this method

Returns:

  • (Float)


38
39
40
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 38

def page
  @page
end

#startFloat

TODO: Write general description for this method

Returns:

  • (Float)


42
43
44
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 42

def start
  @start
end

#total_countFloat

TODO: Write general description for this method

Returns:

  • (Float)


46
47
48
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 46

def total_count
  @total_count
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 88

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  aps = nil
  unless hash['aps'].nil?
    aps = []
    hash['aps'].each do |structure|
      aps << (SleImpactedApsAp.from_hash(structure) if structure)
    end
  end

  aps = nil unless hash.key?('aps')
  classifier = hash.key?('classifier') ? hash['classifier'] : nil
  mend = hash.key?('end') ? hash['end'] : nil
  failure = hash.key?('failure') ? hash['failure'] : nil
  limit = hash.key?('limit') ? hash['limit'] : nil
  metric = hash.key?('metric') ? hash['metric'] : nil
  page = hash.key?('page') ? hash['page'] : nil
  start = hash.key?('start') ? hash['start'] : nil
  total_count = hash.key?('total_count') ? hash['total_count'] : nil

  # Create object from extracted values.
  SleImpactedAps.new(aps,
                     classifier,
                     mend,
                     failure,
                     limit,
                     metric,
                     page,
                     start,
                     total_count)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['aps'] = 'aps'
  @_hash['classifier'] = 'classifier'
  @_hash['mend'] = 'end'
  @_hash['failure'] = 'failure'
  @_hash['limit'] = 'limit'
  @_hash['metric'] = 'metric'
  @_hash['page'] = 'page'
  @_hash['start'] = 'start'
  @_hash['total_count'] = 'total_count'
  @_hash
end

.nullablesObject

An array for nullable fields



69
70
71
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 69

def self.nullables
  []
end

.optionalsObject

An array for optional fields



64
65
66
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 64

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



132
133
134
135
136
137
138
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 132

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} aps: #{@aps.inspect}, classifier: #{@classifier.inspect}, mend:"\
  " #{@mend.inspect}, failure: #{@failure.inspect}, limit: #{@limit.inspect}, metric:"\
  " #{@metric.inspect}, page: #{@page.inspect}, start: #{@start.inspect}, total_count:"\
  " #{@total_count.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



124
125
126
127
128
129
# File 'lib/mist_api/models/sle_impacted_aps.rb', line 124

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} aps: #{@aps}, classifier: #{@classifier}, mend: #{@mend}, failure:"\
  " #{@failure}, limit: #{@limit}, metric: #{@metric}, page: #{@page}, start: #{@start},"\
  " total_count: #{@total_count}>"
end