Class: MistApi::ResponseSsrUpgradeStatus
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseSsrUpgradeStatus
- Defined in:
- lib/mist_api/models/response_ssr_upgrade_status.rb
Overview
ResponseSsrUpgradeStatus Model.
Instance Attribute Summary collapse
-
#channel ⇒ String
TODO: Write general description for this method.
-
#device_type ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#status ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#targets ⇒ ResponseSsrUpgradeStatusTargets
Unique ID of the object instance in the Mist Organization.
-
#versions ⇒ Object
Unique ID of the object instance in the Mist Organization.
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(channel = nil, id = nil, status = nil, targets = nil, versions = nil, device_type = SKIP) ⇒ ResponseSsrUpgradeStatus
constructor
A new instance of ResponseSsrUpgradeStatus.
-
#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(channel = nil, id = nil, status = nil, targets = nil, versions = nil, device_type = SKIP) ⇒ ResponseSsrUpgradeStatus
Returns a new instance of ResponseSsrUpgradeStatus.
60 61 62 63 64 65 66 67 68 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 60 def initialize(channel = nil, id = nil, status = nil, targets = nil, versions = nil, device_type = SKIP) @channel = channel @device_type = device_type unless device_type == SKIP @id = id @status = status @targets = targets @versions = versions end |
Instance Attribute Details
#channel ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 14 def channel @channel end |
#device_type ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 18 def device_type @device_type end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
22 23 24 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 22 def id @id end |
#status ⇒ String
Unique ID of the object instance in the Mist Organization
26 27 28 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 26 def status @status end |
#targets ⇒ ResponseSsrUpgradeStatusTargets
Unique ID of the object instance in the Mist Organization
30 31 32 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 30 def targets @targets end |
#versions ⇒ Object
Unique ID of the object instance in the Mist Organization
34 35 36 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 34 def versions @versions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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_ssr_upgrade_status.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. channel = hash.key?('channel') ? hash['channel'] : nil id = hash.key?('id') ? hash['id'] : nil status = hash.key?('status') ? hash['status'] : nil targets = ResponseSsrUpgradeStatusTargets.from_hash(hash['targets']) if hash['targets'] versions = hash.key?('versions') ? hash['versions'] : nil device_type = hash.key?('device_type') ? hash['device_type'] : SKIP # Create object from extracted values. ResponseSsrUpgradeStatus.new(channel, id, status, targets, versions, device_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['channel'] = 'channel' @_hash['device_type'] = 'device_type' @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['targets'] = 'targets' @_hash['versions'] = 'versions' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 |
# File 'lib/mist_api/models/response_ssr_upgrade_status.rb', line 49 def self.optionals %w[ device_type ] 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_ssr_upgrade_status.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel.inspect}, device_type: #{@device_type.inspect}, id:"\ " #{@id.inspect}, status: #{@status.inspect}, targets: #{@targets.inspect}, versions:"\ " #{@versions.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_ssr_upgrade_status.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel}, device_type: #{@device_type}, id: #{@id}, status:"\ " #{@status}, targets: #{@targets}, versions: #{@versions}>" end |