Class: MistApi::MapSitesurveyPathItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::MapSitesurveyPathItems
- Defined in:
- lib/mist_api/models/map_sitesurvey_path_items.rb
Overview
MapSitesurveyPathItems Model.
Instance Attribute Summary collapse
-
#coordinate ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#name ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#nodes ⇒ Array[MapNode]
Unique ID of the object instance in the Mist Organization.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(coordinate = SKIP, id = SKIP, name = SKIP, nodes = SKIP) ⇒ MapSitesurveyPathItems
constructor
A new instance of MapSitesurveyPathItems.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(coordinate = SKIP, id = SKIP, name = SKIP, nodes = SKIP) ⇒ MapSitesurveyPathItems
Returns a new instance of MapSitesurveyPathItems.
53 54 55 56 57 58 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 53 def initialize(coordinate = SKIP, id = SKIP, name = SKIP, nodes = SKIP) @coordinate = coordinate unless coordinate == SKIP @id = id unless id == SKIP @name = name unless name == SKIP @nodes = nodes unless nodes == SKIP end |
Instance Attribute Details
#coordinate ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 14 def coordinate @coordinate end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
18 19 20 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 18 def id @id end |
#name ⇒ String
Unique ID of the object instance in the Mist Organization
22 23 24 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 22 def name @name end |
#nodes ⇒ Array[MapNode]
Unique ID of the object instance in the Mist Organization
26 27 28 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 26 def nodes @nodes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. coordinate = hash.key?('coordinate') ? hash['coordinate'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP # Parameter is an array, so we need to iterate through it nodes = nil unless hash['nodes'].nil? nodes = [] hash['nodes'].each do |structure| nodes << (MapNode.from_hash(structure) if structure) end end nodes = SKIP unless hash.key?('nodes') # Create object from extracted values. MapSitesurveyPathItems.new(coordinate, id, name, nodes) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['coordinate'] = 'coordinate' @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['nodes'] = 'nodes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 39 def self.optionals %w[ coordinate id name nodes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} coordinate: #{@coordinate.inspect}, id: #{@id.inspect}, name:"\ " #{@name.inspect}, nodes: #{@nodes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
87 88 89 90 |
# File 'lib/mist_api/models/map_sitesurvey_path_items.rb', line 87 def to_s class_name = self.class.name.split('::').last "<#{class_name} coordinate: #{@coordinate}, id: #{@id}, name: #{@name}, nodes: #{@nodes}>" end |