Class: Azure::ARM::Compute::Models::DiskInstanceView
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::DiskInstanceView
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/disk_instance_view.rb
Overview
The instance view of the disk.
Instance Attribute Summary collapse
-
#name ⇒ String
Gets or sets the disk name.
-
#statuses ⇒ Array<InstanceViewStatus>
information.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ DiskInstanceView
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#name ⇒ String
Returns Gets or sets the disk name.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/disk_instance_view.rb', line 16 def name @name end |
#statuses ⇒ Array<InstanceViewStatus>
information.
20 21 22 |
# File 'lib/azure_mgmt_compute/models/disk_instance_view.rb', line 20 def statuses @statuses end |
Class Method Details
.deserialize_object(object) ⇒ DiskInstanceView
Deserializes given Ruby Hash into Model object.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/azure_mgmt_compute/models/disk_instance_view.rb', line 62 def self.deserialize_object(object) return if object.nil? output_object = DiskInstanceView.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['statuses'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element1| unless element1.nil? element1 = InstanceViewStatus.deserialize_object(element1) end deserializedArray.push(element1); end deserialized_property = deserializedArray; end output_object.statuses = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/azure_mgmt_compute/models/disk_instance_view.rb', line 34 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.statuses unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = InstanceViewStatus.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['statuses'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
25 26 27 |
# File 'lib/azure_mgmt_compute/models/disk_instance_view.rb', line 25 def validate @statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil? end |