Class: Azure::ARM::Compute::Models::VirtualMachineExtensionInstanceView
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::VirtualMachineExtensionInstanceView
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb
Overview
The instance view of a virtual machine extension.
Instance Attribute Summary collapse
-
#name ⇒ String
Gets or sets the virtual machine extension name.
-
#statuses ⇒ Array<InstanceViewStatus>
information.
-
#substatuses ⇒ Array<InstanceViewStatus>
information.
-
#type ⇒ String
which includes both publisher and type.
-
#type_handler_version ⇒ String
handler.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualMachineExtensionInstanceView
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 virtual machine extension name.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 16 def name @name end |
#statuses ⇒ Array<InstanceViewStatus>
information.
32 33 34 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 32 def statuses @statuses end |
#substatuses ⇒ Array<InstanceViewStatus>
information.
28 29 30 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 28 def substatuses @substatuses end |
#type ⇒ String
which includes both publisher and type.
20 21 22 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 20 def type @type end |
#type_handler_version ⇒ String
handler.
24 25 26 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 24 def type_handler_version @type_handler_version end |
Class Method Details
.deserialize_object(object) ⇒ VirtualMachineExtensionInstanceView
Deserializes given Ruby Hash into Model object.
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 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 94 def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineExtensionInstanceView.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['type'] output_object.type = deserialized_property deserialized_property = object['typeHandlerVersion'] output_object.type_handler_version = deserialized_property deserialized_property = object['substatuses'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element2| unless element2.nil? element2 = InstanceViewStatus.deserialize_object(element2) end deserializedArray.push(element2); end deserialized_property = deserializedArray; end output_object.substatuses = deserialized_property deserialized_property = object['statuses'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element3| unless element3.nil? element3 = InstanceViewStatus.deserialize_object(element3) end deserializedArray.push(element3); 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.
47 48 49 50 51 52 53 54 55 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 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 47 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.type output_object['type'] = serialized_property unless serialized_property.nil? serialized_property = object.type_handler_version output_object['typeHandlerVersion'] = serialized_property unless serialized_property.nil? serialized_property = object.substatuses 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['substatuses'] = serialized_property unless serialized_property.nil? serialized_property = object.statuses unless serialized_property.nil? serializedArray = [] serialized_property.each do |element1| unless element1.nil? element1 = InstanceViewStatus.serialize_object(element1) end serializedArray.push(element1) 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.
37 38 39 40 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb', line 37 def validate @substatuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @substatuses.nil? @statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil? end |