Class: Azure::ARM::Compute::Models::VirtualMachineInstanceView
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::VirtualMachineInstanceView
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb
Overview
The instance view of a virtual machine.
Instance Attribute Summary collapse
-
#disks ⇒ Array<DiskInstanceView>
information.
-
#extensions ⇒ Array<VirtualMachineExtensionInstanceView>
extensions information.
-
#platform_fault_domain ⇒ Integer
Gets or sets the Fault Domain count.
-
#platform_update_domain ⇒ Integer
Gets or sets the Update Domain count.
-
#rdp_thumb_print ⇒ String
thumbprint.
-
#statuses ⇒ Array<InstanceViewStatus>
information.
-
#vm_agent ⇒ VirtualMachineAgentInstanceView
running on the virtual machine.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualMachineInstanceView
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
#disks ⇒ Array<DiskInstanceView>
information.
31 32 33 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 31 def disks @disks end |
#extensions ⇒ Array<VirtualMachineExtensionInstanceView>
extensions information.
35 36 37 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 35 def extensions @extensions end |
#platform_fault_domain ⇒ Integer
Returns Gets or sets the Fault Domain count.
19 20 21 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 19 def platform_fault_domain @platform_fault_domain end |
#platform_update_domain ⇒ Integer
Returns Gets or sets the Update Domain count.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 16 def platform_update_domain @platform_update_domain end |
#rdp_thumb_print ⇒ String
thumbprint.
23 24 25 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 23 def rdp_thumb_print @rdp_thumb_print end |
#statuses ⇒ Array<InstanceViewStatus>
information.
39 40 41 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 39 def statuses @statuses end |
#vm_agent ⇒ VirtualMachineAgentInstanceView
running on the virtual machine.
27 28 29 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 27 def vm_agent @vm_agent end |
Class Method Details
.deserialize_object(object) ⇒ VirtualMachineInstanceView
Deserializes given Ruby Hash into Model object.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 122 def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineInstanceView.new deserialized_property = object['platformUpdateDomain'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.platform_update_domain = deserialized_property deserialized_property = object['platformFaultDomain'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.platform_fault_domain = deserialized_property deserialized_property = object['rdpThumbPrint'] output_object.rdp_thumb_print = deserialized_property deserialized_property = object['vmAgent'] unless deserialized_property.nil? deserialized_property = VirtualMachineAgentInstanceView.deserialize_object(deserialized_property) end output_object.vm_agent = deserialized_property deserialized_property = object['disks'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element3| unless element3.nil? element3 = DiskInstanceView.deserialize_object(element3) end deserializedArray.push(element3); end deserialized_property = deserializedArray; end output_object.disks = deserialized_property deserialized_property = object['extensions'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element4| unless element4.nil? element4 = VirtualMachineExtensionInstanceView.deserialize_object(element4) end deserializedArray.push(element4); end deserialized_property = deserializedArray; end output_object.extensions = deserialized_property deserialized_property = object['statuses'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element5| unless element5.nil? element5 = InstanceViewStatus.deserialize_object(element5) end deserializedArray.push(element5); 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.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 56 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.platform_update_domain output_object['platformUpdateDomain'] = serialized_property unless serialized_property.nil? serialized_property = object.platform_fault_domain output_object['platformFaultDomain'] = serialized_property unless serialized_property.nil? serialized_property = object.rdp_thumb_print output_object['rdpThumbPrint'] = serialized_property unless serialized_property.nil? serialized_property = object.vm_agent unless serialized_property.nil? serialized_property = VirtualMachineAgentInstanceView.serialize_object(serialized_property) end output_object['vmAgent'] = serialized_property unless serialized_property.nil? serialized_property = object.disks unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = DiskInstanceView.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['disks'] = serialized_property unless serialized_property.nil? serialized_property = object.extensions unless serialized_property.nil? serializedArray = [] serialized_property.each do |element1| unless element1.nil? element1 = VirtualMachineExtensionInstanceView.serialize_object(element1) end serializedArray.push(element1) end serialized_property = serializedArray end output_object['extensions'] = serialized_property unless serialized_property.nil? serialized_property = object.statuses unless serialized_property.nil? serializedArray = [] serialized_property.each do |element2| unless element2.nil? element2 = InstanceViewStatus.serialize_object(element2) end serializedArray.push(element2) 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.
44 45 46 47 48 49 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb', line 44 def validate @vm_agent.validate unless @vm_agent.nil? @disks.each{ |e| e.validate if e.respond_to?(:validate) } unless @disks.nil? @extensions.each{ |e| e.validate if e.respond_to?(:validate) } unless @extensions.nil? @statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil? end |