Class: MistApi::ResponseOrgInventoryChange
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseOrgInventoryChange
- Defined in:
- lib/mist_api/models/response_org_inventory_change.rb
Overview
ResponseOrgInventoryChange Model.
Instance Attribute Summary collapse
-
#error ⇒ Array[String]
TODO: Write general description for this method.
-
#op ⇒ ResponseOrgInventoryChangeOpEnum
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`.
-
#reason ⇒ Array[String]
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`.
-
#success ⇒ Array[String]
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`.
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(error = nil, op = nil, reason = nil, success = nil) ⇒ ResponseOrgInventoryChange
constructor
A new instance of ResponseOrgInventoryChange.
-
#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(error = nil, op = nil, reason = nil, success = nil) ⇒ ResponseOrgInventoryChange
Returns a new instance of ResponseOrgInventoryChange.
51 52 53 54 55 56 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 51 def initialize(error = nil, op = nil, reason = nil, success = nil) @error = error @op = op @reason = reason @success = success end |
Instance Attribute Details
#error ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 14 def error @error end |
#op ⇒ ResponseOrgInventoryChangeOpEnum
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`
19 20 21 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 19 def op @op end |
#reason ⇒ Array[String]
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`
24 25 26 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 24 def reason @reason end |
#success ⇒ Array[String]
enum: ‘assign`, `delete`, `downgrade_to_jsi`, `unassign`, `upgrade_to_mist`
29 30 31 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 29 def success @success end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. error = hash.key?('error') ? hash['error'] : nil op = hash.key?('op') ? hash['op'] : nil reason = hash.key?('reason') ? hash['reason'] : nil success = hash.key?('success') ? hash['success'] : nil # Create object from extracted values. ResponseOrgInventoryChange.new(error, op, reason, success) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 39 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['error'] = 'error' @_hash['op'] = 'op' @_hash['reason'] = 'reason' @_hash['success'] = 'success' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 42 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
82 83 84 85 86 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 82 def inspect class_name = self.class.name.split('::').last "<#{class_name} error: #{@error.inspect}, op: #{@op.inspect}, reason: #{@reason.inspect},"\ " success: #{@success.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
76 77 78 79 |
# File 'lib/mist_api/models/response_org_inventory_change.rb', line 76 def to_s class_name = self.class.name.split('::').last "<#{class_name} error: #{@error}, op: #{@op}, reason: #{@reason}, success: #{@success}>" end |