azure_mgmt_compute 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +3 -0
- data/.travis.yml +3 -0
- data/Gemfile +17 -0
- data/LICENSE.txt +21 -0
- data/README.md +139 -0
- data/Rakefile +5 -0
- data/azure_mgmt_compute.gemspec +39 -0
- data/lib/azure_mgmt_compute.rb +103 -0
- data/lib/azure_mgmt_compute/Models/additional_unattend_content.rb +108 -0
- data/lib/azure_mgmt_compute/Models/api_error.rb +121 -0
- data/lib/azure_mgmt_compute/Models/api_error_base.rb +76 -0
- data/lib/azure_mgmt_compute/Models/availability_set.rb +94 -0
- data/lib/azure_mgmt_compute/Models/availability_set_list_result.rb +79 -0
- data/lib/azure_mgmt_compute/Models/availability_set_properties.rb +130 -0
- data/lib/azure_mgmt_compute/Models/caching_types.rb +17 -0
- data/lib/azure_mgmt_compute/Models/component_names.rb +15 -0
- data/lib/azure_mgmt_compute/Models/compute_long_running_operation_properties.rb +58 -0
- data/lib/azure_mgmt_compute/Models/compute_long_running_operation_result.rb +126 -0
- data/lib/azure_mgmt_compute/Models/compute_operation_status.rb +18 -0
- data/lib/azure_mgmt_compute/Models/data_disk.rb +142 -0
- data/lib/azure_mgmt_compute/Models/data_disk_image.rb +62 -0
- data/lib/azure_mgmt_compute/Models/delete_operation_result.rb +109 -0
- data/lib/azure_mgmt_compute/Models/disk_create_option_types.rb +17 -0
- data/lib/azure_mgmt_compute/Models/disk_instance_view.rb +88 -0
- data/lib/azure_mgmt_compute/Models/hardware_profile.rb +67 -0
- data/lib/azure_mgmt_compute/Models/image_reference.rb +87 -0
- data/lib/azure_mgmt_compute/Models/inner_error.rb +68 -0
- data/lib/azure_mgmt_compute/Models/instance_view_status.rb +102 -0
- data/lib/azure_mgmt_compute/Models/linux_configuration.rb +75 -0
- data/lib/azure_mgmt_compute/Models/list_usages_result.rb +78 -0
- data/lib/azure_mgmt_compute/Models/network_interface_reference.rb +70 -0
- data/lib/azure_mgmt_compute/Models/network_interface_reference_properties.rb +59 -0
- data/lib/azure_mgmt_compute/Models/network_profile.rb +79 -0
- data/lib/azure_mgmt_compute/Models/operating_system_types.rb +16 -0
- data/lib/azure_mgmt_compute/Models/operation_status.rb +17 -0
- data/lib/azure_mgmt_compute/Models/osdisk.rb +135 -0
- data/lib/azure_mgmt_compute/Models/osdisk_image.rb +63 -0
- data/lib/azure_mgmt_compute/Models/osprofile.rb +149 -0
- data/lib/azure_mgmt_compute/Models/pass_names.rb +15 -0
- data/lib/azure_mgmt_compute/Models/plan.rb +85 -0
- data/lib/azure_mgmt_compute/Models/protocol_types.rb +16 -0
- data/lib/azure_mgmt_compute/Models/purchase_plan.rb +77 -0
- data/lib/azure_mgmt_compute/Models/setting_names.rb +16 -0
- data/lib/azure_mgmt_compute/Models/ssh_configuration.rb +79 -0
- data/lib/azure_mgmt_compute/Models/ssh_public_key.rb +72 -0
- data/lib/azure_mgmt_compute/Models/status_level_types.rb +17 -0
- data/lib/azure_mgmt_compute/Models/storage_profile.rb +110 -0
- data/lib/azure_mgmt_compute/Models/usage.rb +98 -0
- data/lib/azure_mgmt_compute/Models/usage_name.rb +68 -0
- data/lib/azure_mgmt_compute/Models/usage_unit.rb +15 -0
- data/lib/azure_mgmt_compute/Models/vault_certificate.rb +70 -0
- data/lib/azure_mgmt_compute/Models/vault_secret_group.rb +96 -0
- data/lib/azure_mgmt_compute/Models/virtual_hard_disk.rb +59 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine.rb +142 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_agent_instance_view.rb +119 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_capture_parameters.rb +78 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension.rb +94 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension_handler_instance_view.rb +85 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension_image.rb +99 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension_image_properties.rb +102 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension_instance_view.rb +139 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_extension_properties.rb +133 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_image.rb +99 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_image_properties.rb +110 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_image_resource.rb +83 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_instance_view.rb +188 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_list_result.rb +89 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_properties.rb +156 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_size.rb +111 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_size_list_result.rb +79 -0
- data/lib/azure_mgmt_compute/Models/virtual_machine_size_types.rb +34 -0
- data/lib/azure_mgmt_compute/Models/win_rmconfiguration.rb +79 -0
- data/lib/azure_mgmt_compute/Models/win_rmlistener.rb +73 -0
- data/lib/azure_mgmt_compute/Models/windows_configuration.rb +126 -0
- data/lib/azure_mgmt_compute/availability_sets.rb +473 -0
- data/lib/azure_mgmt_compute/compute_management_client.rb +85 -0
- data/lib/azure_mgmt_compute/module_definition.rb +6 -0
- data/lib/azure_mgmt_compute/usage_operations.rb +113 -0
- data/lib/azure_mgmt_compute/version.rb +6 -0
- data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +325 -0
- data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +384 -0
- data/lib/azure_mgmt_compute/virtual_machine_images.rb +525 -0
- data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +114 -0
- data/lib/azure_mgmt_compute/virtual_machines.rb +1412 -0
- metadata +303 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Describes the properties of a Virtual Machine Extension.
|
|
10
|
+
#
|
|
11
|
+
class VirtualMachineExtensionProperties
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [String] Gets or sets the name of the extension handler
|
|
16
|
+
# publisher.
|
|
17
|
+
attr_accessor :publisher
|
|
18
|
+
|
|
19
|
+
# @return [String] Gets or sets the type of the extension handler.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
# @return [String] Gets or sets the type version of the extension
|
|
23
|
+
# handler.
|
|
24
|
+
attr_accessor :type_handler_version
|
|
25
|
+
|
|
26
|
+
# @return [Boolean] Gets or sets whether the extension handler should be
|
|
27
|
+
# automatically upgraded across minor versions.
|
|
28
|
+
attr_accessor :auto_upgrade_minor_version
|
|
29
|
+
|
|
30
|
+
# @return Gets or sets Json formatted public settings for the extension.
|
|
31
|
+
attr_accessor :settings
|
|
32
|
+
|
|
33
|
+
# @return Gets or sets Json formatted protected settings for the
|
|
34
|
+
# extension.
|
|
35
|
+
attr_accessor :protected_settings
|
|
36
|
+
|
|
37
|
+
# @return [String] Gets or sets the provisioning state, which only
|
|
38
|
+
# appears in the response.
|
|
39
|
+
attr_accessor :provisioning_state
|
|
40
|
+
|
|
41
|
+
# @return [VirtualMachineExtensionInstanceView] Gets or sets the virtual
|
|
42
|
+
# machine extension instance view.
|
|
43
|
+
attr_accessor :instance_view
|
|
44
|
+
|
|
45
|
+
#
|
|
46
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
47
|
+
#
|
|
48
|
+
def validate
|
|
49
|
+
@instance_view.validate unless @instance_view.nil?
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
#
|
|
53
|
+
# Serializes given Model object into Ruby Hash.
|
|
54
|
+
# @param object Model object to serialize.
|
|
55
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
56
|
+
#
|
|
57
|
+
def self.serialize_object(object)
|
|
58
|
+
object.validate
|
|
59
|
+
output_object = {}
|
|
60
|
+
|
|
61
|
+
serialized_property = object.publisher
|
|
62
|
+
output_object['publisher'] = serialized_property unless serialized_property.nil?
|
|
63
|
+
|
|
64
|
+
serialized_property = object.type
|
|
65
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
|
66
|
+
|
|
67
|
+
serialized_property = object.type_handler_version
|
|
68
|
+
output_object['typeHandlerVersion'] = serialized_property unless serialized_property.nil?
|
|
69
|
+
|
|
70
|
+
serialized_property = object.auto_upgrade_minor_version
|
|
71
|
+
output_object['autoUpgradeMinorVersion'] = serialized_property unless serialized_property.nil?
|
|
72
|
+
|
|
73
|
+
serialized_property = object.settings
|
|
74
|
+
output_object['settings'] = serialized_property unless serialized_property.nil?
|
|
75
|
+
|
|
76
|
+
serialized_property = object.protected_settings
|
|
77
|
+
output_object['protectedSettings'] = serialized_property unless serialized_property.nil?
|
|
78
|
+
|
|
79
|
+
serialized_property = object.provisioning_state
|
|
80
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
|
81
|
+
|
|
82
|
+
serialized_property = object.instance_view
|
|
83
|
+
unless serialized_property.nil?
|
|
84
|
+
serialized_property = VirtualMachineExtensionInstanceView.serialize_object(serialized_property)
|
|
85
|
+
end
|
|
86
|
+
output_object['instanceView'] = serialized_property unless serialized_property.nil?
|
|
87
|
+
|
|
88
|
+
output_object
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
#
|
|
92
|
+
# Deserializes given Ruby Hash into Model object.
|
|
93
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
94
|
+
# @return [VirtualMachineExtensionProperties] Deserialized object.
|
|
95
|
+
#
|
|
96
|
+
def self.deserialize_object(object)
|
|
97
|
+
return if object.nil?
|
|
98
|
+
output_object = VirtualMachineExtensionProperties.new
|
|
99
|
+
|
|
100
|
+
deserialized_property = object['publisher']
|
|
101
|
+
output_object.publisher = deserialized_property
|
|
102
|
+
|
|
103
|
+
deserialized_property = object['type']
|
|
104
|
+
output_object.type = deserialized_property
|
|
105
|
+
|
|
106
|
+
deserialized_property = object['typeHandlerVersion']
|
|
107
|
+
output_object.type_handler_version = deserialized_property
|
|
108
|
+
|
|
109
|
+
deserialized_property = object['autoUpgradeMinorVersion']
|
|
110
|
+
output_object.auto_upgrade_minor_version = deserialized_property
|
|
111
|
+
|
|
112
|
+
deserialized_property = object['settings']
|
|
113
|
+
output_object.settings = deserialized_property
|
|
114
|
+
|
|
115
|
+
deserialized_property = object['protectedSettings']
|
|
116
|
+
output_object.protected_settings = deserialized_property
|
|
117
|
+
|
|
118
|
+
deserialized_property = object['provisioningState']
|
|
119
|
+
output_object.provisioning_state = deserialized_property
|
|
120
|
+
|
|
121
|
+
deserialized_property = object['instanceView']
|
|
122
|
+
unless deserialized_property.nil?
|
|
123
|
+
deserialized_property = VirtualMachineExtensionInstanceView.deserialize_object(deserialized_property)
|
|
124
|
+
end
|
|
125
|
+
output_object.instance_view = deserialized_property
|
|
126
|
+
|
|
127
|
+
output_object.validate
|
|
128
|
+
|
|
129
|
+
output_object
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Describes a Virtual Machine Image.
|
|
10
|
+
#
|
|
11
|
+
class VirtualMachineImage < MsRestAzure::SubResource
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [VirtualMachineImageProperties]
|
|
16
|
+
attr_accessor :properties
|
|
17
|
+
|
|
18
|
+
# @return [String] Gets or sets the name of the resource.
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# @return [String] Gets or sets the location of the resource.
|
|
22
|
+
attr_accessor :location
|
|
23
|
+
|
|
24
|
+
# @return [Hash{String => String}] Gets or sets the tags attached to the
|
|
25
|
+
# resource.
|
|
26
|
+
attr_accessor :tags
|
|
27
|
+
|
|
28
|
+
#
|
|
29
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
30
|
+
#
|
|
31
|
+
def validate
|
|
32
|
+
@properties.validate unless @properties.nil?
|
|
33
|
+
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
#
|
|
37
|
+
# Serializes given Model object into Ruby Hash.
|
|
38
|
+
# @param object Model object to serialize.
|
|
39
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
40
|
+
#
|
|
41
|
+
def self.serialize_object(object)
|
|
42
|
+
object.validate
|
|
43
|
+
output_object = {}
|
|
44
|
+
|
|
45
|
+
serialized_property = object.id
|
|
46
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
|
47
|
+
|
|
48
|
+
serialized_property = object.properties
|
|
49
|
+
unless serialized_property.nil?
|
|
50
|
+
serialized_property = VirtualMachineImageProperties.serialize_object(serialized_property)
|
|
51
|
+
end
|
|
52
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
|
53
|
+
|
|
54
|
+
serialized_property = object.name
|
|
55
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
|
56
|
+
|
|
57
|
+
serialized_property = object.location
|
|
58
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
|
59
|
+
|
|
60
|
+
serialized_property = object.tags
|
|
61
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
|
62
|
+
|
|
63
|
+
output_object
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
#
|
|
67
|
+
# Deserializes given Ruby Hash into Model object.
|
|
68
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
69
|
+
# @return [VirtualMachineImage] Deserialized object.
|
|
70
|
+
#
|
|
71
|
+
def self.deserialize_object(object)
|
|
72
|
+
return if object.nil?
|
|
73
|
+
output_object = VirtualMachineImage.new
|
|
74
|
+
|
|
75
|
+
deserialized_property = object['id']
|
|
76
|
+
output_object.id = deserialized_property
|
|
77
|
+
|
|
78
|
+
deserialized_property = object['properties']
|
|
79
|
+
unless deserialized_property.nil?
|
|
80
|
+
deserialized_property = VirtualMachineImageProperties.deserialize_object(deserialized_property)
|
|
81
|
+
end
|
|
82
|
+
output_object.properties = deserialized_property
|
|
83
|
+
|
|
84
|
+
deserialized_property = object['name']
|
|
85
|
+
output_object.name = deserialized_property
|
|
86
|
+
|
|
87
|
+
deserialized_property = object['location']
|
|
88
|
+
output_object.location = deserialized_property
|
|
89
|
+
|
|
90
|
+
deserialized_property = object['tags']
|
|
91
|
+
output_object.tags = deserialized_property
|
|
92
|
+
|
|
93
|
+
output_object.validate
|
|
94
|
+
|
|
95
|
+
output_object
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Describes the properties of a Virtual Machine Image.
|
|
10
|
+
#
|
|
11
|
+
class VirtualMachineImageProperties
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [PurchasePlan]
|
|
16
|
+
attr_accessor :plan
|
|
17
|
+
|
|
18
|
+
# @return [OSDiskImage]
|
|
19
|
+
attr_accessor :os_disk_image
|
|
20
|
+
|
|
21
|
+
# @return [Array<DataDiskImage>]
|
|
22
|
+
attr_accessor :data_disk_images
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
26
|
+
#
|
|
27
|
+
def validate
|
|
28
|
+
@plan.validate unless @plan.nil?
|
|
29
|
+
@os_disk_image.validate unless @os_disk_image.nil?
|
|
30
|
+
@data_disk_images.each{ |e| e.validate if e.respond_to?(:validate) } unless @data_disk_images.nil?
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
#
|
|
34
|
+
# Serializes given Model object into Ruby Hash.
|
|
35
|
+
# @param object Model object to serialize.
|
|
36
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
37
|
+
#
|
|
38
|
+
def self.serialize_object(object)
|
|
39
|
+
object.validate
|
|
40
|
+
output_object = {}
|
|
41
|
+
|
|
42
|
+
serialized_property = object.plan
|
|
43
|
+
unless serialized_property.nil?
|
|
44
|
+
serialized_property = PurchasePlan.serialize_object(serialized_property)
|
|
45
|
+
end
|
|
46
|
+
output_object['plan'] = serialized_property unless serialized_property.nil?
|
|
47
|
+
|
|
48
|
+
serialized_property = object.os_disk_image
|
|
49
|
+
unless serialized_property.nil?
|
|
50
|
+
serialized_property = OSDiskImage.serialize_object(serialized_property)
|
|
51
|
+
end
|
|
52
|
+
output_object['osDiskImage'] = serialized_property unless serialized_property.nil?
|
|
53
|
+
|
|
54
|
+
serialized_property = object.data_disk_images
|
|
55
|
+
unless serialized_property.nil?
|
|
56
|
+
serializedArray = []
|
|
57
|
+
serialized_property.each do |element|
|
|
58
|
+
unless element.nil?
|
|
59
|
+
element = DataDiskImage.serialize_object(element)
|
|
60
|
+
end
|
|
61
|
+
serializedArray.push(element)
|
|
62
|
+
end
|
|
63
|
+
serialized_property = serializedArray
|
|
64
|
+
end
|
|
65
|
+
output_object['dataDiskImages'] = serialized_property unless serialized_property.nil?
|
|
66
|
+
|
|
67
|
+
output_object
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
#
|
|
71
|
+
# Deserializes given Ruby Hash into Model object.
|
|
72
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
73
|
+
# @return [VirtualMachineImageProperties] Deserialized object.
|
|
74
|
+
#
|
|
75
|
+
def self.deserialize_object(object)
|
|
76
|
+
return if object.nil?
|
|
77
|
+
output_object = VirtualMachineImageProperties.new
|
|
78
|
+
|
|
79
|
+
deserialized_property = object['plan']
|
|
80
|
+
unless deserialized_property.nil?
|
|
81
|
+
deserialized_property = PurchasePlan.deserialize_object(deserialized_property)
|
|
82
|
+
end
|
|
83
|
+
output_object.plan = deserialized_property
|
|
84
|
+
|
|
85
|
+
deserialized_property = object['osDiskImage']
|
|
86
|
+
unless deserialized_property.nil?
|
|
87
|
+
deserialized_property = OSDiskImage.deserialize_object(deserialized_property)
|
|
88
|
+
end
|
|
89
|
+
output_object.os_disk_image = deserialized_property
|
|
90
|
+
|
|
91
|
+
deserialized_property = object['dataDiskImages']
|
|
92
|
+
unless deserialized_property.nil?
|
|
93
|
+
deserializedArray = [];
|
|
94
|
+
deserialized_property.each do |element1|
|
|
95
|
+
unless element1.nil?
|
|
96
|
+
element1 = DataDiskImage.deserialize_object(element1)
|
|
97
|
+
end
|
|
98
|
+
deserializedArray.push(element1);
|
|
99
|
+
end
|
|
100
|
+
deserialized_property = deserializedArray;
|
|
101
|
+
end
|
|
102
|
+
output_object.data_disk_images = deserialized_property
|
|
103
|
+
|
|
104
|
+
output_object.validate
|
|
105
|
+
|
|
106
|
+
output_object
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Virtual machine image resource information.
|
|
10
|
+
#
|
|
11
|
+
class VirtualMachineImageResource < MsRestAzure::SubResource
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [String] Gets or sets the name of the resource.
|
|
16
|
+
attr_accessor :name
|
|
17
|
+
|
|
18
|
+
# @return [String] Gets or sets the location of the resource.
|
|
19
|
+
attr_accessor :location
|
|
20
|
+
|
|
21
|
+
# @return [Hash{String => String}] Gets or sets the tags attached to the
|
|
22
|
+
# resource.
|
|
23
|
+
attr_accessor :tags
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
27
|
+
#
|
|
28
|
+
def validate
|
|
29
|
+
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Serializes given Model object into Ruby Hash.
|
|
34
|
+
# @param object Model object to serialize.
|
|
35
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
36
|
+
#
|
|
37
|
+
def self.serialize_object(object)
|
|
38
|
+
object.validate
|
|
39
|
+
output_object = {}
|
|
40
|
+
|
|
41
|
+
serialized_property = object.id
|
|
42
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
|
43
|
+
|
|
44
|
+
serialized_property = object.name
|
|
45
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
|
46
|
+
|
|
47
|
+
serialized_property = object.location
|
|
48
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
|
49
|
+
|
|
50
|
+
serialized_property = object.tags
|
|
51
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
|
52
|
+
|
|
53
|
+
output_object
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
#
|
|
57
|
+
# Deserializes given Ruby Hash into Model object.
|
|
58
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
59
|
+
# @return [VirtualMachineImageResource] Deserialized object.
|
|
60
|
+
#
|
|
61
|
+
def self.deserialize_object(object)
|
|
62
|
+
return if object.nil?
|
|
63
|
+
output_object = VirtualMachineImageResource.new
|
|
64
|
+
|
|
65
|
+
deserialized_property = object['id']
|
|
66
|
+
output_object.id = deserialized_property
|
|
67
|
+
|
|
68
|
+
deserialized_property = object['name']
|
|
69
|
+
output_object.name = deserialized_property
|
|
70
|
+
|
|
71
|
+
deserialized_property = object['location']
|
|
72
|
+
output_object.location = deserialized_property
|
|
73
|
+
|
|
74
|
+
deserialized_property = object['tags']
|
|
75
|
+
output_object.tags = deserialized_property
|
|
76
|
+
|
|
77
|
+
output_object.validate
|
|
78
|
+
|
|
79
|
+
output_object
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Compute
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# The instance view of a virtual machine.
|
|
10
|
+
#
|
|
11
|
+
class VirtualMachineInstanceView
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [Integer] Gets or sets the Update Domain count.
|
|
16
|
+
attr_accessor :platform_update_domain
|
|
17
|
+
|
|
18
|
+
# @return [Integer] Gets or sets the Fault Domain count.
|
|
19
|
+
attr_accessor :platform_fault_domain
|
|
20
|
+
|
|
21
|
+
# @return [String] Gets or sets the Remote desktop certificate
|
|
22
|
+
# thumbprint.
|
|
23
|
+
attr_accessor :rdp_thumb_print
|
|
24
|
+
|
|
25
|
+
# @return [VirtualMachineAgentInstanceView] Gets or sets the VM Agent
|
|
26
|
+
# running on the virtual machine.
|
|
27
|
+
attr_accessor :vm_agent
|
|
28
|
+
|
|
29
|
+
# @return [Array<DiskInstanceView>] Gets or sets the the disks
|
|
30
|
+
# information.
|
|
31
|
+
attr_accessor :disks
|
|
32
|
+
|
|
33
|
+
# @return [Array<VirtualMachineExtensionInstanceView>] Gets or sets the
|
|
34
|
+
# extensions information.
|
|
35
|
+
attr_accessor :extensions
|
|
36
|
+
|
|
37
|
+
# @return [Array<InstanceViewStatus>] Gets or sets the resource status
|
|
38
|
+
# information.
|
|
39
|
+
attr_accessor :statuses
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
# Validate the object. Throws ValidationError if validation fails.
|
|
43
|
+
#
|
|
44
|
+
def validate
|
|
45
|
+
@vm_agent.validate unless @vm_agent.nil?
|
|
46
|
+
@disks.each{ |e| e.validate if e.respond_to?(:validate) } unless @disks.nil?
|
|
47
|
+
@extensions.each{ |e| e.validate if e.respond_to?(:validate) } unless @extensions.nil?
|
|
48
|
+
@statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil?
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
#
|
|
52
|
+
# Serializes given Model object into Ruby Hash.
|
|
53
|
+
# @param object Model object to serialize.
|
|
54
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
|
55
|
+
#
|
|
56
|
+
def self.serialize_object(object)
|
|
57
|
+
object.validate
|
|
58
|
+
output_object = {}
|
|
59
|
+
|
|
60
|
+
serialized_property = object.platform_update_domain
|
|
61
|
+
output_object['platformUpdateDomain'] = serialized_property unless serialized_property.nil?
|
|
62
|
+
|
|
63
|
+
serialized_property = object.platform_fault_domain
|
|
64
|
+
output_object['platformFaultDomain'] = serialized_property unless serialized_property.nil?
|
|
65
|
+
|
|
66
|
+
serialized_property = object.rdp_thumb_print
|
|
67
|
+
output_object['rdpThumbPrint'] = serialized_property unless serialized_property.nil?
|
|
68
|
+
|
|
69
|
+
serialized_property = object.vm_agent
|
|
70
|
+
unless serialized_property.nil?
|
|
71
|
+
serialized_property = VirtualMachineAgentInstanceView.serialize_object(serialized_property)
|
|
72
|
+
end
|
|
73
|
+
output_object['vmAgent'] = serialized_property unless serialized_property.nil?
|
|
74
|
+
|
|
75
|
+
serialized_property = object.disks
|
|
76
|
+
unless serialized_property.nil?
|
|
77
|
+
serializedArray = []
|
|
78
|
+
serialized_property.each do |element|
|
|
79
|
+
unless element.nil?
|
|
80
|
+
element = DiskInstanceView.serialize_object(element)
|
|
81
|
+
end
|
|
82
|
+
serializedArray.push(element)
|
|
83
|
+
end
|
|
84
|
+
serialized_property = serializedArray
|
|
85
|
+
end
|
|
86
|
+
output_object['disks'] = serialized_property unless serialized_property.nil?
|
|
87
|
+
|
|
88
|
+
serialized_property = object.extensions
|
|
89
|
+
unless serialized_property.nil?
|
|
90
|
+
serializedArray = []
|
|
91
|
+
serialized_property.each do |element1|
|
|
92
|
+
unless element1.nil?
|
|
93
|
+
element1 = VirtualMachineExtensionInstanceView.serialize_object(element1)
|
|
94
|
+
end
|
|
95
|
+
serializedArray.push(element1)
|
|
96
|
+
end
|
|
97
|
+
serialized_property = serializedArray
|
|
98
|
+
end
|
|
99
|
+
output_object['extensions'] = serialized_property unless serialized_property.nil?
|
|
100
|
+
|
|
101
|
+
serialized_property = object.statuses
|
|
102
|
+
unless serialized_property.nil?
|
|
103
|
+
serializedArray = []
|
|
104
|
+
serialized_property.each do |element2|
|
|
105
|
+
unless element2.nil?
|
|
106
|
+
element2 = InstanceViewStatus.serialize_object(element2)
|
|
107
|
+
end
|
|
108
|
+
serializedArray.push(element2)
|
|
109
|
+
end
|
|
110
|
+
serialized_property = serializedArray
|
|
111
|
+
end
|
|
112
|
+
output_object['statuses'] = serialized_property unless serialized_property.nil?
|
|
113
|
+
|
|
114
|
+
output_object
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
#
|
|
118
|
+
# Deserializes given Ruby Hash into Model object.
|
|
119
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
|
120
|
+
# @return [VirtualMachineInstanceView] Deserialized object.
|
|
121
|
+
#
|
|
122
|
+
def self.deserialize_object(object)
|
|
123
|
+
return if object.nil?
|
|
124
|
+
output_object = VirtualMachineInstanceView.new
|
|
125
|
+
|
|
126
|
+
deserialized_property = object['platformUpdateDomain']
|
|
127
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
|
128
|
+
output_object.platform_update_domain = deserialized_property
|
|
129
|
+
|
|
130
|
+
deserialized_property = object['platformFaultDomain']
|
|
131
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
|
132
|
+
output_object.platform_fault_domain = deserialized_property
|
|
133
|
+
|
|
134
|
+
deserialized_property = object['rdpThumbPrint']
|
|
135
|
+
output_object.rdp_thumb_print = deserialized_property
|
|
136
|
+
|
|
137
|
+
deserialized_property = object['vmAgent']
|
|
138
|
+
unless deserialized_property.nil?
|
|
139
|
+
deserialized_property = VirtualMachineAgentInstanceView.deserialize_object(deserialized_property)
|
|
140
|
+
end
|
|
141
|
+
output_object.vm_agent = deserialized_property
|
|
142
|
+
|
|
143
|
+
deserialized_property = object['disks']
|
|
144
|
+
unless deserialized_property.nil?
|
|
145
|
+
deserializedArray = [];
|
|
146
|
+
deserialized_property.each do |element3|
|
|
147
|
+
unless element3.nil?
|
|
148
|
+
element3 = DiskInstanceView.deserialize_object(element3)
|
|
149
|
+
end
|
|
150
|
+
deserializedArray.push(element3);
|
|
151
|
+
end
|
|
152
|
+
deserialized_property = deserializedArray;
|
|
153
|
+
end
|
|
154
|
+
output_object.disks = deserialized_property
|
|
155
|
+
|
|
156
|
+
deserialized_property = object['extensions']
|
|
157
|
+
unless deserialized_property.nil?
|
|
158
|
+
deserializedArray = [];
|
|
159
|
+
deserialized_property.each do |element4|
|
|
160
|
+
unless element4.nil?
|
|
161
|
+
element4 = VirtualMachineExtensionInstanceView.deserialize_object(element4)
|
|
162
|
+
end
|
|
163
|
+
deserializedArray.push(element4);
|
|
164
|
+
end
|
|
165
|
+
deserialized_property = deserializedArray;
|
|
166
|
+
end
|
|
167
|
+
output_object.extensions = deserialized_property
|
|
168
|
+
|
|
169
|
+
deserialized_property = object['statuses']
|
|
170
|
+
unless deserialized_property.nil?
|
|
171
|
+
deserializedArray = [];
|
|
172
|
+
deserialized_property.each do |element5|
|
|
173
|
+
unless element5.nil?
|
|
174
|
+
element5 = InstanceViewStatus.deserialize_object(element5)
|
|
175
|
+
end
|
|
176
|
+
deserializedArray.push(element5);
|
|
177
|
+
end
|
|
178
|
+
deserialized_property = deserializedArray;
|
|
179
|
+
end
|
|
180
|
+
output_object.statuses = deserialized_property
|
|
181
|
+
|
|
182
|
+
output_object.validate
|
|
183
|
+
|
|
184
|
+
output_object
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|