Class: MistApi::MapSiteImportFile

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

Overview

MapSiteImportFile 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(auto_deviceprofile_assignment = SKIP, csv = SKIP, file = SKIP, json = SKIP) ⇒ MapSiteImportFile

Returns a new instance of MapSiteImportFile.



54
55
56
57
58
59
60
61
62
63
# File 'lib/mist_api/models/map_site_import_file.rb', line 54

def initialize(auto_deviceprofile_assignment = SKIP, csv = SKIP,
               file = SKIP, json = SKIP)
  unless auto_deviceprofile_assignment == SKIP
    @auto_deviceprofile_assignment =
      auto_deviceprofile_assignment
  end
  @csv = csv unless csv == SKIP
  @file = file unless file == SKIP
  @json = json unless json == SKIP
end

Instance Attribute Details

#auto_deviceprofile_assignmentTrueClass | FalseClass

Whether to auto assign device to deviceprofile by name

Returns:

  • (TrueClass | FalseClass)


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

def auto_deviceprofile_assignment
  @auto_deviceprofile_assignment
end

#csvBinary

CSV file for ap name mapping, optional

Returns:

  • (Binary)


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

def csv
  @csv
end

#fileBinary

Ekahau or ibwave file

Returns:

  • (Binary)


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

def file
  @file
end

#jsonMapImportJson

Ekahau or ibwave file

Returns:



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

def json
  @json
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/mist_api/models/map_site_import_file.rb', line 66

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  auto_deviceprofile_assignment =
    hash.key?('auto_deviceprofile_assignment') ? hash['auto_deviceprofile_assignment'] : SKIP
  csv = hash.key?('csv') ? hash['csv'] : SKIP
  file = hash.key?('file') ? hash['file'] : SKIP
  json = MapImportJson.from_hash(hash['json']) if hash['json']

  # Create object from extracted values.
  MapSiteImportFile.new(auto_deviceprofile_assignment,
                        csv,
                        file,
                        json)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
36
37
# File 'lib/mist_api/models/map_site_import_file.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['auto_deviceprofile_assignment'] =
    'auto_deviceprofile_assignment'
  @_hash['csv'] = 'csv'
  @_hash['file'] = 'file'
  @_hash['json'] = 'json'
  @_hash
end

.nullablesObject

An array for nullable fields



50
51
52
# File 'lib/mist_api/models/map_site_import_file.rb', line 50

def self.nullables
  []
end

.optionalsObject

An array for optional fields



40
41
42
43
44
45
46
47
# File 'lib/mist_api/models/map_site_import_file.rb', line 40

def self.optionals
  %w[
    auto_deviceprofile_assignment
    csv
    file
    json
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



91
92
93
94
95
# File 'lib/mist_api/models/map_site_import_file.rb', line 91

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} auto_deviceprofile_assignment: #{@auto_deviceprofile_assignment.inspect},"\
  " csv: #{@csv.inspect}, file: #{@file.inspect}, json: #{@json.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



84
85
86
87
88
# File 'lib/mist_api/models/map_site_import_file.rb', line 84

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} auto_deviceprofile_assignment: #{@auto_deviceprofile_assignment}, csv:"\
  " #{@csv}, file: #{@file}, json: #{@json}>"
end