Class: MistApi::UpgradeOrgDevicesUpgradeInfo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::UpgradeOrgDevicesUpgradeInfo
- Defined in:
- lib/mist_api/models/upgrade_org_devices_upgrade_info.rb
Overview
UpgradeOrgDevicesUpgradeInfo Model.
Instance Attribute Summary collapse
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#start_time ⇒ Integer
Unique ID of the object instance in the Mist Organization.
-
#status ⇒ UpgradeDeviceStatusEnum
status upgrade is in.
-
#targets ⇒ UpgradeDevicesTargets
status upgrade is in.
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(id = SKIP, start_time = SKIP, status = SKIP, targets = SKIP) ⇒ UpgradeOrgDevicesUpgradeInfo
constructor
A new instance of UpgradeOrgDevicesUpgradeInfo.
-
#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(id = SKIP, start_time = SKIP, status = SKIP, targets = SKIP) ⇒ UpgradeOrgDevicesUpgradeInfo
Returns a new instance of UpgradeOrgDevicesUpgradeInfo.
55 56 57 58 59 60 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 55 def initialize(id = SKIP, start_time = SKIP, status = SKIP, targets = SKIP) @id = id unless id == SKIP @start_time = start_time unless start_time == SKIP @status = status unless status == SKIP @targets = targets unless targets == SKIP end |
Instance Attribute Details
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
14 15 16 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 14 def id @id end |
#start_time ⇒ Integer
Unique ID of the object instance in the Mist Organization
18 19 20 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 18 def start_time @start_time end |
#status ⇒ UpgradeDeviceStatusEnum
status upgrade is in. enum: ‘cancelled`, `completed`, `created`, `downloaded`, `downloading`, `failed`, `upgrading`, `queued`
23 24 25 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 23 def status @status end |
#targets ⇒ UpgradeDevicesTargets
status upgrade is in. enum: ‘cancelled`, `completed`, `created`, `downloaded`, `downloading`, `failed`, `upgrading`, `queued`
28 29 30 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 28 def targets @targets 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/upgrade_org_devices_upgrade_info.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP start_time = hash.key?('start_time') ? hash['start_time'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP targets = UpgradeDevicesTargets.from_hash(hash['targets']) if hash['targets'] # Create object from extracted values. UpgradeOrgDevicesUpgradeInfo.new(id, start_time, status, targets) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['start_time'] = 'start_time' @_hash['status'] = 'status' @_hash['targets'] = 'targets' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 48 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 41 def self.optionals %w[ id start_time status targets ] 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/upgrade_org_devices_upgrade_info.rb', line 87 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, start_time: #{@start_time.inspect}, status:"\ " #{@status.inspect}, targets: #{@targets.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
80 81 82 83 84 |
# File 'lib/mist_api/models/upgrade_org_devices_upgrade_info.rb', line 80 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, start_time: #{@start_time}, status: #{@status}, targets:"\ " #{@targets}>" end |