Class: MistApi::ResponseMapImportSummary

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

Overview

ResponseMapImportSummary 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(num_ap_assigned = nil, num_inv_assigned = nil, num_map_assigned = nil) ⇒ ResponseMapImportSummary

Returns a new instance of ResponseMapImportSummary.



43
44
45
46
47
48
# File 'lib/mist_api/models/response_map_import_summary.rb', line 43

def initialize(num_ap_assigned = nil, num_inv_assigned = nil,
               num_map_assigned = nil)
  @num_ap_assigned = num_ap_assigned
  @num_inv_assigned = num_inv_assigned
  @num_map_assigned = num_map_assigned
end

Instance Attribute Details

#num_ap_assignedInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def num_ap_assigned
  @num_ap_assigned
end

#num_inv_assignedInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def num_inv_assigned
  @num_inv_assigned
end

#num_map_assignedInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def num_map_assigned
  @num_map_assigned
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/mist_api/models/response_map_import_summary.rb', line 51

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  num_ap_assigned =
    hash.key?('num_ap_assigned') ? hash['num_ap_assigned'] : nil
  num_inv_assigned =
    hash.key?('num_inv_assigned') ? hash['num_inv_assigned'] : nil
  num_map_assigned =
    hash.key?('num_map_assigned') ? hash['num_map_assigned'] : nil

  # Create object from extracted values.
  ResponseMapImportSummary.new(num_ap_assigned,
                               num_inv_assigned,
                               num_map_assigned)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['num_ap_assigned'] = 'num_ap_assigned'
  @_hash['num_inv_assigned'] = 'num_inv_assigned'
  @_hash['num_map_assigned'] = 'num_map_assigned'
  @_hash
end

.nullablesObject

An array for nullable fields



39
40
41
# File 'lib/mist_api/models/response_map_import_summary.rb', line 39

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



76
77
78
79
80
# File 'lib/mist_api/models/response_map_import_summary.rb', line 76

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

#to_sObject

Provides a human-readable string representation of the object.



69
70
71
72
73
# File 'lib/mist_api/models/response_map_import_summary.rb', line 69

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