Class: MistApi::ResponseAutoOrientation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseAutoOrientation
- Defined in:
- lib/mist_api/models/response_auto_orientation.rb
Overview
ResponseAutoOrientation Model.
Instance Attribute Summary collapse
-
#devices ⇒ Hash[String, ResponseAutoOrientationDevice]
Contains the validation status of each device.
-
#estimated_runtime ⇒ Integer
Estimated runtime for the process in seconds.
-
#reason ⇒ String
Provides the reason for the status.
-
#started ⇒ TrueClass | FalseClass
Indicates whether the auto orient process has started.
-
#valid ⇒ TrueClass | FalseClass
Indicates whether the auto orient request is valid.
-
#wifi_interrupting ⇒ TrueClass | FalseClass
Indicates whether the auto orient process will interrupt WiFi traffic.
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(devices = SKIP, estimated_runtime = SKIP, reason = SKIP, started = SKIP, valid = SKIP, wifi_interrupting = SKIP) ⇒ ResponseAutoOrientation
constructor
A new instance of ResponseAutoOrientation.
-
#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(devices = SKIP, estimated_runtime = SKIP, reason = SKIP, started = SKIP, valid = SKIP, wifi_interrupting = SKIP) ⇒ ResponseAutoOrientation
Returns a new instance of ResponseAutoOrientation.
66 67 68 69 70 71 72 73 74 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 66 def initialize(devices = SKIP, estimated_runtime = SKIP, reason = SKIP, started = SKIP, valid = SKIP, wifi_interrupting = SKIP) @devices = devices unless devices == SKIP @estimated_runtime = estimated_runtime unless estimated_runtime == SKIP @reason = reason unless reason == SKIP @started = started unless started == SKIP @valid = valid unless valid == SKIP @wifi_interrupting = wifi_interrupting unless wifi_interrupting == SKIP end |
Instance Attribute Details
#devices ⇒ Hash[String, ResponseAutoOrientationDevice]
Contains the validation status of each device. The Property Key is the device MAC Address.
15 16 17 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 15 def devices @devices end |
#estimated_runtime ⇒ Integer
Estimated runtime for the process in seconds
19 20 21 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 19 def estimated_runtime @estimated_runtime end |
#reason ⇒ String
Provides the reason for the status.
23 24 25 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 23 def reason @reason end |
#started ⇒ TrueClass | FalseClass
Indicates whether the auto orient process has started.
27 28 29 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 27 def started @started end |
#valid ⇒ TrueClass | FalseClass
Indicates whether the auto orient request is valid.
31 32 33 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 31 def valid @valid end |
#wifi_interrupting ⇒ TrueClass | FalseClass
Indicates whether the auto orient process will interrupt WiFi traffic.
35 36 37 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 35 def wifi_interrupting @wifi_interrupting end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. devices = ResponseAutoOrientationDevice.from_hash(hash['devices']) if hash['devices'] devices = SKIP unless hash.key?('devices') estimated_runtime = hash.key?('estimated_runtime') ? hash['estimated_runtime'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP started = hash.key?('started') ? hash['started'] : SKIP valid = hash.key?('valid') ? hash['valid'] : SKIP wifi_interrupting = hash.key?('wifi_interrupting') ? hash['wifi_interrupting'] : SKIP # Create object from extracted values. ResponseAutoOrientation.new(devices, estimated_runtime, reason, started, valid, wifi_interrupting) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['devices'] = 'devices' @_hash['estimated_runtime'] = 'estimated_runtime' @_hash['reason'] = 'reason' @_hash['started'] = 'started' @_hash['valid'] = 'valid' @_hash['wifi_interrupting'] = 'wifi_interrupting' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 50 def self.optionals %w[ devices estimated_runtime reason started valid wifi_interrupting ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 115 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} devices: #{@devices.inspect}, estimated_runtime:"\ " #{@estimated_runtime.inspect}, reason: #{@reason.inspect}, started: #{@started.inspect},"\ " valid: #{@valid.inspect}, wifi_interrupting: #{@wifi_interrupting.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 107 |
# File 'lib/mist_api/models/response_auto_orientation.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} devices: #{@devices}, estimated_runtime: #{@estimated_runtime}, reason:"\ " #{@reason}, started: #{@started}, valid: #{@valid}, wifi_interrupting:"\ " #{@wifi_interrupting}>" end |