Class: MistApi::ResponseAutoMapAssignment
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseAutoMapAssignment
- Defined in:
- lib/mist_api/models/response_auto_map_assignment.rb
Overview
ResponseAutoMapAssignment Model.
Instance Attribute Summary collapse
-
#devices ⇒ Hash[String, ResponseAutoMapAssignmentDevice]
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 map assignment process has started.
-
#valid ⇒ TrueClass | FalseClass
Indicates whether the auto map assignment request is valid.
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) ⇒ ResponseAutoMapAssignment
constructor
A new instance of ResponseAutoMapAssignment.
-
#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) ⇒ ResponseAutoMapAssignment
Returns a new instance of ResponseAutoMapAssignment.
60 61 62 63 64 65 66 67 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 60 def initialize(devices = SKIP, estimated_runtime = SKIP, reason = SKIP, started = SKIP, valid = 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 end |
Instance Attribute Details
#devices ⇒ Hash[String, ResponseAutoMapAssignmentDevice]
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_map_assignment.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_map_assignment.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_map_assignment.rb', line 23 def reason @reason end |
#started ⇒ TrueClass | FalseClass
Indicates whether the auto map assignment process has started
27 28 29 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 27 def started @started end |
#valid ⇒ TrueClass | FalseClass
Indicates whether the auto map assignment request is valid
31 32 33 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 31 def valid @valid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 70 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. devices = ResponseAutoMapAssignmentDevice.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 # Create object from extracted values. ResponseAutoMapAssignment.new(devices, estimated_runtime, reason, started, valid) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 34 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 end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 53 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 45 def self.optionals %w[ devices estimated_runtime reason started valid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 99 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}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/mist_api/models/response_auto_map_assignment.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} devices: #{@devices}, estimated_runtime: #{@estimated_runtime}, reason:"\ " #{@reason}, started: #{@started}, valid: #{@valid}>" end |