Class: Azure::ARM::Compute::Models::VirtualMachineProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::VirtualMachineProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/virtual_machine_properties.rb
Overview
Describes the properties of a Virtual Machine.
Instance Attribute Summary collapse
-
#availability_set ⇒ SubResource
availability set to which this virtual machine belongs.
-
#diagnostics_profile ⇒ DiagnosticsProfile
Gets or sets the diagnostics profile.
-
#hardware_profile ⇒ HardwareProfile
Gets or sets the hardware profile.
-
#instance_view ⇒ VirtualMachineInstanceView
view.
-
#license_type ⇒ String
your own license scenario.
-
#network_profile ⇒ NetworkProfile
Gets or sets the network profile.
-
#os_profile ⇒ OSProfile
Gets or sets the OS profile.
-
#provisioning_state ⇒ String
appears in the response.
-
#storage_profile ⇒ StorageProfile
Gets or sets the storage profile.
-
#vm_id ⇒ String
Gets the virtual machine unique id.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualMachineProperties
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
#availability_set ⇒ SubResource
availability set to which this virtual machine belongs.
32 33 34 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 32 def availability_set @availability_set end |
#diagnostics_profile ⇒ DiagnosticsProfile
Returns Gets or sets the diagnostics profile.
28 29 30 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 28 def diagnostics_profile @diagnostics_profile end |
#hardware_profile ⇒ HardwareProfile
Returns Gets or sets the hardware profile.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 16 def hardware_profile @hardware_profile end |
#instance_view ⇒ VirtualMachineInstanceView
view.
40 41 42 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 40 def instance_view @instance_view end |
#license_type ⇒ String
your own license scenario.
44 45 46 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 44 def license_type @license_type end |
#network_profile ⇒ NetworkProfile
Returns Gets or sets the network profile.
25 26 27 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 25 def network_profile @network_profile end |
#os_profile ⇒ OSProfile
Returns Gets or sets the OS profile.
22 23 24 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 22 def os_profile @os_profile end |
#provisioning_state ⇒ String
appears in the response.
36 37 38 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 36 def provisioning_state @provisioning_state end |
#storage_profile ⇒ StorageProfile
Returns Gets or sets the storage profile.
19 20 21 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 19 def storage_profile @storage_profile end |
#vm_id ⇒ String
Returns Gets the virtual machine unique id.
47 48 49 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 47 def vm_id @vm_id end |
Class Method Details
.deserialize_object(object) ⇒ VirtualMachineProperties
Deserializes given Ruby Hash into Model object.
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 186 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 130 def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineProperties.new deserialized_property = object['hardwareProfile'] unless deserialized_property.nil? deserialized_property = HardwareProfile.deserialize_object(deserialized_property) end output_object.hardware_profile = deserialized_property deserialized_property = object['storageProfile'] unless deserialized_property.nil? deserialized_property = StorageProfile.deserialize_object(deserialized_property) end output_object.storage_profile = deserialized_property deserialized_property = object['osProfile'] unless deserialized_property.nil? deserialized_property = OSProfile.deserialize_object(deserialized_property) end output_object.os_profile = deserialized_property deserialized_property = object['networkProfile'] unless deserialized_property.nil? deserialized_property = NetworkProfile.deserialize_object(deserialized_property) end output_object.network_profile = deserialized_property deserialized_property = object['diagnosticsProfile'] unless deserialized_property.nil? deserialized_property = DiagnosticsProfile.deserialize_object(deserialized_property) end output_object.diagnostics_profile = deserialized_property deserialized_property = object['availabilitySet'] unless deserialized_property.nil? deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property) end output_object.availability_set = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property deserialized_property = object['instanceView'] unless deserialized_property.nil? deserialized_property = VirtualMachineInstanceView.deserialize_object(deserialized_property) end output_object.instance_view = deserialized_property deserialized_property = object['licenseType'] output_object.license_type = deserialized_property deserialized_property = object['vmId'] output_object.vm_id = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
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 116 117 118 119 120 121 122 123 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 67 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.hardware_profile unless serialized_property.nil? serialized_property = HardwareProfile.serialize_object(serialized_property) end output_object['hardwareProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.storage_profile unless serialized_property.nil? serialized_property = StorageProfile.serialize_object(serialized_property) end output_object['storageProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.os_profile unless serialized_property.nil? serialized_property = OSProfile.serialize_object(serialized_property) end output_object['osProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.network_profile unless serialized_property.nil? serialized_property = NetworkProfile.serialize_object(serialized_property) end output_object['networkProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.diagnostics_profile unless serialized_property.nil? serialized_property = DiagnosticsProfile.serialize_object(serialized_property) end output_object['diagnosticsProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.availability_set unless serialized_property.nil? serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property) end output_object['availabilitySet'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? serialized_property = object.instance_view unless serialized_property.nil? serialized_property = VirtualMachineInstanceView.serialize_object(serialized_property) end output_object['instanceView'] = serialized_property unless serialized_property.nil? serialized_property = object.license_type output_object['licenseType'] = serialized_property unless serialized_property.nil? serialized_property = object.vm_id output_object['vmId'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
52 53 54 55 56 57 58 59 60 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_properties.rb', line 52 def validate @hardware_profile.validate unless @hardware_profile.nil? @storage_profile.validate unless @storage_profile.nil? @os_profile.validate unless @os_profile.nil? @network_profile.validate unless @network_profile.nil? @diagnostics_profile.validate unless @diagnostics_profile.nil? @availability_set.validate unless @availability_set.nil? @instance_view.validate unless @instance_view.nil? end |