Class: MistApi::ResponseAutoPlacementInfo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseAutoPlacementInfo
- Defined in:
- lib/mist_api/models/response_auto_placement_info.rb
Overview
ResponseAutoPlacementInfo Model.
Instance Attribute Summary collapse
-
#end_time ⇒ Float
Time when autoplacement completed or was manually stopped.
-
#est_time_left ⇒ Float
(Only when inprogress) estimate of the time to completion.
-
#start_time ⇒ Integer
Time when autoplacement process was last queued for this map.
-
#status ⇒ AutoPlacementInfoStatusEnum
the status of autoplacement for a given map.
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(end_time = SKIP, est_time_left = SKIP, start_time = SKIP, status = SKIP) ⇒ ResponseAutoPlacementInfo
constructor
A new instance of ResponseAutoPlacementInfo.
-
#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(end_time = SKIP, est_time_left = SKIP, start_time = SKIP, status = SKIP) ⇒ ResponseAutoPlacementInfo
Returns a new instance of ResponseAutoPlacementInfo.
54 55 56 57 58 59 60 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 54 def initialize(end_time = SKIP, est_time_left = SKIP, start_time = SKIP, status = SKIP) @end_time = end_time unless end_time == SKIP @est_time_left = est_time_left unless est_time_left == SKIP @start_time = start_time unless start_time == SKIP @status = status unless status == SKIP end |
Instance Attribute Details
#end_time ⇒ Float
Time when autoplacement completed or was manually stopped
14 15 16 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 14 def end_time @end_time end |
#est_time_left ⇒ Float
(Only when inprogress) estimate of the time to completion
18 19 20 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 18 def est_time_left @est_time_left end |
#start_time ⇒ Integer
Time when autoplacement process was last queued for this map
22 23 24 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 22 def start_time @start_time end |
#status ⇒ AutoPlacementInfoStatusEnum
the status of autoplacement for a given map. enum: ‘done`, `error`, `inprogress`, `pending`
27 28 29 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 27 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. end_time = hash.key?('end_time') ? hash['end_time'] : SKIP est_time_left = hash.key?('est_time_left') ? hash['est_time_left'] : SKIP start_time = hash.key?('start_time') ? hash['start_time'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP # Create object from extracted values. ResponseAutoPlacementInfo.new(end_time, est_time_left, start_time, status) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['end_time'] = 'end_time' @_hash['est_time_left'] = 'est_time_left' @_hash['start_time'] = 'start_time' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 40 def self.optionals %w[ end_time est_time_left start_time status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
87 88 89 90 91 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 87 def inspect class_name = self.class.name.split('::').last "<#{class_name} end_time: #{@end_time.inspect}, est_time_left: #{@est_time_left.inspect},"\ " start_time: #{@start_time.inspect}, status: #{@status.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
80 81 82 83 84 |
# File 'lib/mist_api/models/response_auto_placement_info.rb', line 80 def to_s class_name = self.class.name.split('::').last "<#{class_name} end_time: #{@end_time}, est_time_left: #{@est_time_left}, start_time:"\ " #{@start_time}, status: #{@status}>" end |