Class: MistApi::ResponseAutoOrientationInfo

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

Overview

ResponseAutoOrientationInfo 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(est_time_left = SKIP, start_time = SKIP, status = SKIP, stop_time = SKIP) ⇒ ResponseAutoOrientationInfo

Returns a new instance of ResponseAutoOrientationInfo.



57
58
59
60
61
62
63
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 57

def initialize(est_time_left = SKIP, start_time = SKIP, status = SKIP,
               stop_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
  @stop_time = stop_time unless stop_time == SKIP
end

Instance Attribute Details

#est_time_leftFloat

Only when ‘status`==`inprogress`, estimate of the time to completion

Returns:

  • (Float)


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

def est_time_left
  @est_time_left
end

#start_timeFloat

time when auto orient process was last queued for this map

Returns:

  • (Float)


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

def start_time
  @start_time
end

#statusResponseAutoOrientationInfoStatusEnum

The status of auto orient for a given map. enum:

* `pending`: Auto orient has not been requested for this map
* `inprogress`: Auto orient is currently processing
* `done`: The auto orient process has completed
* `error`: There was an error in the auto orient process


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

def status
  @status
end

#stop_timeFloat

time when auto orient completed or was manually stopped

Returns:

  • (Float)


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

def stop_time
  @stop_time
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
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 66

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  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
  stop_time = hash.key?('stop_time') ? hash['stop_time'] : SKIP

  # Create object from extracted values.
  ResponseAutoOrientationInfo.new(est_time_left,
                                  start_time,
                                  status,
                                  stop_time)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['est_time_left'] = 'est_time_left'
  @_hash['start_time'] = 'start_time'
  @_hash['status'] = 'status'
  @_hash['stop_time'] = 'stop_time'
  @_hash
end

.nullablesObject

An array for nullable fields



53
54
55
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 53

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    est_time_left
    start_time
    status
    stop_time
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



90
91
92
93
94
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 90

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} est_time_left: #{@est_time_left.inspect}, start_time:"\
  " #{@start_time.inspect}, status: #{@status.inspect}, stop_time: #{@stop_time.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



83
84
85
86
87
# File 'lib/mist_api/models/response_auto_orientation_info.rb', line 83

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} est_time_left: #{@est_time_left}, start_time: #{@start_time}, status:"\
  " #{@status}, stop_time: #{@stop_time}>"
end