Class: Verizon::DeleteDevicesResult
- Defined in:
- lib/verizon/models/delete_devices_result.rb
Overview
Response for a request made to delete a device.
Instance Attribute Summary collapse
-
#device_ids ⇒ Object
One object per device to be deleted.
-
#message ⇒ String
Not present if status=Success.
-
#status ⇒ String
“Success” if the device was deleted, or “Failed” if there was a problem.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(device_ids = SKIP, status = SKIP, message = SKIP) ⇒ DeleteDevicesResult
constructor
A new instance of DeleteDevicesResult.
-
#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(device_ids = SKIP, status = SKIP, message = SKIP) ⇒ DeleteDevicesResult
Returns a new instance of DeleteDevicesResult.
50 51 52 53 54 |
# File 'lib/verizon/models/delete_devices_result.rb', line 50 def initialize(device_ids = SKIP, status = SKIP, = SKIP) @device_ids = device_ids unless device_ids == SKIP @status = status unless status == SKIP @message = unless == SKIP end |
Instance Attribute Details
#device_ids ⇒ Object
One object per device to be deleted. Each object must contain a kind and id element identifying the device.
15 16 17 |
# File 'lib/verizon/models/delete_devices_result.rb', line 15 def device_ids @device_ids end |
#message ⇒ String
Not present if status=Success. One of these messages if status=Failed:The device is not in deactivate state.The user does not have access to delete the device.
25 26 27 |
# File 'lib/verizon/models/delete_devices_result.rb', line 25 def @message end |
#status ⇒ String
“Success” if the device was deleted, or “Failed” if there was a problem.
19 20 21 |
# File 'lib/verizon/models/delete_devices_result.rb', line 19 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/verizon/models/delete_devices_result.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_ids = hash.key?('deviceIds') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:DeleteDevicesResultDeviceIds), hash['deviceIds'] ) : SKIP status = hash.key?('status') ? hash['status'] : SKIP = hash.key?('message') ? hash['message'] : SKIP # Create object from extracted values. DeleteDevicesResult.new(device_ids, status, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/verizon/models/delete_devices_result.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['device_ids'] = 'deviceIds' @_hash['status'] = 'status' @_hash['message'] = 'message' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/verizon/models/delete_devices_result.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/verizon/models/delete_devices_result.rb', line 37 def self.optionals %w[ device_ids status message ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
75 76 77 78 79 80 81 |
# File 'lib/verizon/models/delete_devices_result.rb', line 75 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/verizon/models/delete_devices_result.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} device_ids: #{@device_ids.inspect}, status: #{@status.inspect}, message:"\ " #{@message.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 |
# File 'lib/verizon/models/delete_devices_result.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} device_ids: #{@device_ids}, status: #{@status}, message: #{@message}>" end |