azure_mgmt_compute 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/azure_mgmt_compute.gemspec +3 -11
- data/lib/azure_mgmt_compute/availability_sets.rb +226 -241
- data/lib/azure_mgmt_compute/compute_management_client.rb +26 -11
- data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +8 -11
- data/lib/azure_mgmt_compute/models/api_entity_reference.rb +58 -0
- data/lib/azure_mgmt_compute/models/api_error.rb +4 -6
- data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set.rb +1 -3
- data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/availability_set_properties.rb +9 -11
- data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +67 -0
- data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +65 -0
- data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +3 -6
- data/lib/azure_mgmt_compute/models/compute_operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/data_disk.rb +27 -26
- data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -3
- data/lib/azure_mgmt_compute/models/delete_operation_result.rb +6 -5
- data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +62 -0
- data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +81 -0
- data/lib/azure_mgmt_compute/models/disk_instance_view.rb +4 -6
- data/lib/azure_mgmt_compute/models/hardware_profile.rb +15 -9
- data/lib/azure_mgmt_compute/models/image_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/inner_error.rb +1 -3
- data/lib/azure_mgmt_compute/models/instance_view_status.rb +3 -5
- data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +74 -0
- data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +75 -0
- data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -3
- data/lib/azure_mgmt_compute/models/list_usages_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -3
- data/lib/azure_mgmt_compute/models/network_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/operation_status.rb +1 -1
- data/lib/azure_mgmt_compute/models/osdisk.rb +54 -26
- data/lib/azure_mgmt_compute/models/osdisk_image.rb +4 -6
- data/lib/azure_mgmt_compute/models/osprofile.rb +4 -6
- data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/plan.rb +1 -3
- data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/purchase_plan.rb +4 -4
- data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/azure_mgmt_compute/models/sku.rb +75 -0
- data/lib/azure_mgmt_compute/models/ssh_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -3
- data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/azure_mgmt_compute/models/storage_profile.rb +4 -6
- data/lib/azure_mgmt_compute/models/{usage_unit.rb → upgrade_mode.rb} +5 -4
- data/lib/azure_mgmt_compute/models/upgrade_policy.rb +60 -0
- data/lib/azure_mgmt_compute/models/usage.rb +7 -9
- data/lib/azure_mgmt_compute/models/usage_name.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -3
- data/lib/azure_mgmt_compute/models/vault_secret_group.rb +6 -8
- data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +68 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +56 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +4 -4
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +7 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +15 -15
- data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +9 -9
- data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +28 -14
- data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +29 -5
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +108 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +116 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +125 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +79 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +127 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +80 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +129 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +147 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +89 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +88 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +90 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +78 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +165 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +87 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +59 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +202 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +77 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +114 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +190 -0
- data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -3
- data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +4 -6
- data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +53 -45
- data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +68 -0
- data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +4 -6
- data/lib/azure_mgmt_compute/models/win_rmlistener.rb +3 -5
- data/lib/azure_mgmt_compute/models/windows_configuration.rb +4 -6
- data/lib/azure_mgmt_compute/module_definition.rb +5 -3
- data/lib/azure_mgmt_compute/usage_operations.rb +75 -42
- data/lib/azure_mgmt_compute/version.rb +5 -3
- data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +71 -158
- data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +66 -149
- data/lib/azure_mgmt_compute/virtual_machine_images.rb +121 -264
- data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +750 -0
- data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +1327 -0
- data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +75 -42
- data/lib/azure_mgmt_compute/virtual_machines.rb +397 -623
- data/lib/azure_mgmt_compute.rb +57 -18
- metadata +50 -128
- data/.gitignore +0 -10
- data/.travis.yml +0 -3
- data/Gemfile +0 -17
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
+
# Specifies the list of virtual machine scale set instance IDs.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetVMInstanceRequiredIDs
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<String>] Gets or sets the virtual machine scale set
|
16
|
+
# instance ids.
|
17
|
+
attr_accessor :instance_ids
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
fail MsRest::ValidationError, 'property instance_ids is nil' if @instance_ids.nil?
|
24
|
+
@instance_ids.each{ |e| e.validate if e.respond_to?(:validate) } unless @instance_ids.nil?
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Serializes given Model object into Ruby Hash.
|
29
|
+
# @param object Model object to serialize.
|
30
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
31
|
+
#
|
32
|
+
def self.serialize_object(object)
|
33
|
+
object.validate
|
34
|
+
output_object = {}
|
35
|
+
|
36
|
+
serialized_property = object.instance_ids
|
37
|
+
output_object['instanceIds'] = serialized_property unless serialized_property.nil?
|
38
|
+
|
39
|
+
output_object
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Deserializes given Ruby Hash into Model object.
|
44
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
45
|
+
# @return [VirtualMachineScaleSetVMInstanceRequiredIDs] Deserialized
|
46
|
+
# object.
|
47
|
+
#
|
48
|
+
def self.deserialize_object(object)
|
49
|
+
return if object.nil?
|
50
|
+
output_object = VirtualMachineScaleSetVMInstanceRequiredIDs.new
|
51
|
+
|
52
|
+
deserialized_property = object['instanceIds']
|
53
|
+
output_object.instance_ids = deserialized_property
|
54
|
+
|
55
|
+
output_object
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,202 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 scale set VM.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetVMInstanceView
|
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 disks information.
|
30
|
+
attr_accessor :disks
|
31
|
+
|
32
|
+
# @return [Array<VirtualMachineExtensionInstanceView>] Gets or sets the
|
33
|
+
# extensions information.
|
34
|
+
attr_accessor :extensions
|
35
|
+
|
36
|
+
# @return [BootDiagnosticsInstanceView] Gets or sets the boot
|
37
|
+
# diagnostics.
|
38
|
+
attr_accessor :boot_diagnostics
|
39
|
+
|
40
|
+
# @return [Array<InstanceViewStatus>] Gets or sets the resource status
|
41
|
+
# information.
|
42
|
+
attr_accessor :statuses
|
43
|
+
|
44
|
+
#
|
45
|
+
# Validate the object. Throws ValidationError if validation fails.
|
46
|
+
#
|
47
|
+
def validate
|
48
|
+
@vm_agent.validate unless @vm_agent.nil?
|
49
|
+
@disks.each{ |e| e.validate if e.respond_to?(:validate) } unless @disks.nil?
|
50
|
+
@extensions.each{ |e| e.validate if e.respond_to?(:validate) } unless @extensions.nil?
|
51
|
+
@boot_diagnostics.validate unless @boot_diagnostics.nil?
|
52
|
+
@statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil?
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Serializes given Model object into Ruby Hash.
|
57
|
+
# @param object Model object to serialize.
|
58
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
59
|
+
#
|
60
|
+
def self.serialize_object(object)
|
61
|
+
object.validate
|
62
|
+
output_object = {}
|
63
|
+
|
64
|
+
serialized_property = object.platform_update_domain
|
65
|
+
output_object['platformUpdateDomain'] = serialized_property unless serialized_property.nil?
|
66
|
+
|
67
|
+
serialized_property = object.platform_fault_domain
|
68
|
+
output_object['platformFaultDomain'] = serialized_property unless serialized_property.nil?
|
69
|
+
|
70
|
+
serialized_property = object.rdp_thumb_print
|
71
|
+
output_object['rdpThumbPrint'] = serialized_property unless serialized_property.nil?
|
72
|
+
|
73
|
+
serialized_property = object.vm_agent
|
74
|
+
unless serialized_property.nil?
|
75
|
+
serialized_property = VirtualMachineAgentInstanceView.serialize_object(serialized_property)
|
76
|
+
end
|
77
|
+
output_object['vmAgent'] = serialized_property unless serialized_property.nil?
|
78
|
+
|
79
|
+
serialized_property = object.disks
|
80
|
+
unless serialized_property.nil?
|
81
|
+
serializedArray = []
|
82
|
+
serialized_property.each do |element|
|
83
|
+
unless element.nil?
|
84
|
+
element = DiskInstanceView.serialize_object(element)
|
85
|
+
end
|
86
|
+
serializedArray.push(element)
|
87
|
+
end
|
88
|
+
serialized_property = serializedArray
|
89
|
+
end
|
90
|
+
output_object['disks'] = serialized_property unless serialized_property.nil?
|
91
|
+
|
92
|
+
serialized_property = object.extensions
|
93
|
+
unless serialized_property.nil?
|
94
|
+
serializedArray = []
|
95
|
+
serialized_property.each do |element1|
|
96
|
+
unless element1.nil?
|
97
|
+
element1 = VirtualMachineExtensionInstanceView.serialize_object(element1)
|
98
|
+
end
|
99
|
+
serializedArray.push(element1)
|
100
|
+
end
|
101
|
+
serialized_property = serializedArray
|
102
|
+
end
|
103
|
+
output_object['extensions'] = serialized_property unless serialized_property.nil?
|
104
|
+
|
105
|
+
serialized_property = object.boot_diagnostics
|
106
|
+
unless serialized_property.nil?
|
107
|
+
serialized_property = BootDiagnosticsInstanceView.serialize_object(serialized_property)
|
108
|
+
end
|
109
|
+
output_object['bootDiagnostics'] = serialized_property unless serialized_property.nil?
|
110
|
+
|
111
|
+
serialized_property = object.statuses
|
112
|
+
unless serialized_property.nil?
|
113
|
+
serializedArray = []
|
114
|
+
serialized_property.each do |element2|
|
115
|
+
unless element2.nil?
|
116
|
+
element2 = InstanceViewStatus.serialize_object(element2)
|
117
|
+
end
|
118
|
+
serializedArray.push(element2)
|
119
|
+
end
|
120
|
+
serialized_property = serializedArray
|
121
|
+
end
|
122
|
+
output_object['statuses'] = serialized_property unless serialized_property.nil?
|
123
|
+
|
124
|
+
output_object
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
# Deserializes given Ruby Hash into Model object.
|
129
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
130
|
+
# @return [VirtualMachineScaleSetVMInstanceView] Deserialized object.
|
131
|
+
#
|
132
|
+
def self.deserialize_object(object)
|
133
|
+
return if object.nil?
|
134
|
+
output_object = VirtualMachineScaleSetVMInstanceView.new
|
135
|
+
|
136
|
+
deserialized_property = object['platformUpdateDomain']
|
137
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
138
|
+
output_object.platform_update_domain = deserialized_property
|
139
|
+
|
140
|
+
deserialized_property = object['platformFaultDomain']
|
141
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
142
|
+
output_object.platform_fault_domain = deserialized_property
|
143
|
+
|
144
|
+
deserialized_property = object['rdpThumbPrint']
|
145
|
+
output_object.rdp_thumb_print = deserialized_property
|
146
|
+
|
147
|
+
deserialized_property = object['vmAgent']
|
148
|
+
unless deserialized_property.nil?
|
149
|
+
deserialized_property = VirtualMachineAgentInstanceView.deserialize_object(deserialized_property)
|
150
|
+
end
|
151
|
+
output_object.vm_agent = deserialized_property
|
152
|
+
|
153
|
+
deserialized_property = object['disks']
|
154
|
+
unless deserialized_property.nil?
|
155
|
+
deserialized_array = []
|
156
|
+
deserialized_property.each do |element3|
|
157
|
+
unless element3.nil?
|
158
|
+
element3 = DiskInstanceView.deserialize_object(element3)
|
159
|
+
end
|
160
|
+
deserialized_array.push(element3)
|
161
|
+
end
|
162
|
+
deserialized_property = deserialized_array
|
163
|
+
end
|
164
|
+
output_object.disks = deserialized_property
|
165
|
+
|
166
|
+
deserialized_property = object['extensions']
|
167
|
+
unless deserialized_property.nil?
|
168
|
+
deserialized_array = []
|
169
|
+
deserialized_property.each do |element4|
|
170
|
+
unless element4.nil?
|
171
|
+
element4 = VirtualMachineExtensionInstanceView.deserialize_object(element4)
|
172
|
+
end
|
173
|
+
deserialized_array.push(element4)
|
174
|
+
end
|
175
|
+
deserialized_property = deserialized_array
|
176
|
+
end
|
177
|
+
output_object.extensions = deserialized_property
|
178
|
+
|
179
|
+
deserialized_property = object['bootDiagnostics']
|
180
|
+
unless deserialized_property.nil?
|
181
|
+
deserialized_property = BootDiagnosticsInstanceView.deserialize_object(deserialized_property)
|
182
|
+
end
|
183
|
+
output_object.boot_diagnostics = deserialized_property
|
184
|
+
|
185
|
+
deserialized_property = object['statuses']
|
186
|
+
unless deserialized_property.nil?
|
187
|
+
deserialized_array = []
|
188
|
+
deserialized_property.each do |element5|
|
189
|
+
unless element5.nil?
|
190
|
+
element5 = InstanceViewStatus.deserialize_object(element5)
|
191
|
+
end
|
192
|
+
deserialized_array.push(element5)
|
193
|
+
end
|
194
|
+
deserialized_property = deserialized_array
|
195
|
+
end
|
196
|
+
output_object.statuses = deserialized_property
|
197
|
+
|
198
|
+
output_object
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 List Virtual Machine Scale Set VMs operation response.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetVMListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<VirtualMachineScaleSetVM>] Gets or sets the list of
|
16
|
+
# virtual machine scale sets VMs.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Serializes given Model object into Ruby Hash.
|
28
|
+
# @param object Model object to serialize.
|
29
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
30
|
+
#
|
31
|
+
def self.serialize_object(object)
|
32
|
+
object.validate
|
33
|
+
output_object = {}
|
34
|
+
|
35
|
+
serialized_property = object.value
|
36
|
+
unless serialized_property.nil?
|
37
|
+
serializedArray = []
|
38
|
+
serialized_property.each do |element|
|
39
|
+
unless element.nil?
|
40
|
+
element = VirtualMachineScaleSetVM.serialize_object(element)
|
41
|
+
end
|
42
|
+
serializedArray.push(element)
|
43
|
+
end
|
44
|
+
serialized_property = serializedArray
|
45
|
+
end
|
46
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
47
|
+
|
48
|
+
output_object
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Deserializes given Ruby Hash into Model object.
|
53
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
54
|
+
# @return [VirtualMachineScaleSetVMListResult] Deserialized object.
|
55
|
+
#
|
56
|
+
def self.deserialize_object(object)
|
57
|
+
return if object.nil?
|
58
|
+
output_object = VirtualMachineScaleSetVMListResult.new
|
59
|
+
|
60
|
+
deserialized_property = object['value']
|
61
|
+
unless deserialized_property.nil?
|
62
|
+
deserialized_array = []
|
63
|
+
deserialized_property.each do |element1|
|
64
|
+
unless element1.nil?
|
65
|
+
element1 = VirtualMachineScaleSetVM.deserialize_object(element1)
|
66
|
+
end
|
67
|
+
deserialized_array.push(element1)
|
68
|
+
end
|
69
|
+
deserialized_property = deserialized_array
|
70
|
+
end
|
71
|
+
output_object.value = deserialized_property
|
72
|
+
|
73
|
+
output_object
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 scale set virtual machine profile.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetVMProfile
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [VirtualMachineScaleSetOSProfile] Gets or sets the virtual
|
16
|
+
# machine scale set OS profile.
|
17
|
+
attr_accessor :os_profile
|
18
|
+
|
19
|
+
# @return [VirtualMachineScaleSetStorageProfile] Gets or sets the
|
20
|
+
# virtual machine scale set storage profile.
|
21
|
+
attr_accessor :storage_profile
|
22
|
+
|
23
|
+
# @return [VirtualMachineScaleSetNetworkProfile] Gets or sets the
|
24
|
+
# virtual machine scale set network profile.
|
25
|
+
attr_accessor :network_profile
|
26
|
+
|
27
|
+
# @return [VirtualMachineScaleSetExtensionProfile] Gets the virtual
|
28
|
+
# machine scale set extension profile.
|
29
|
+
attr_accessor :extension_profile
|
30
|
+
|
31
|
+
#
|
32
|
+
# Validate the object. Throws ValidationError if validation fails.
|
33
|
+
#
|
34
|
+
def validate
|
35
|
+
@os_profile.validate unless @os_profile.nil?
|
36
|
+
@storage_profile.validate unless @storage_profile.nil?
|
37
|
+
@network_profile.validate unless @network_profile.nil?
|
38
|
+
@extension_profile.validate unless @extension_profile.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Serializes given Model object into Ruby Hash.
|
43
|
+
# @param object Model object to serialize.
|
44
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
45
|
+
#
|
46
|
+
def self.serialize_object(object)
|
47
|
+
object.validate
|
48
|
+
output_object = {}
|
49
|
+
|
50
|
+
serialized_property = object.os_profile
|
51
|
+
unless serialized_property.nil?
|
52
|
+
serialized_property = VirtualMachineScaleSetOSProfile.serialize_object(serialized_property)
|
53
|
+
end
|
54
|
+
output_object['osProfile'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.storage_profile
|
57
|
+
unless serialized_property.nil?
|
58
|
+
serialized_property = VirtualMachineScaleSetStorageProfile.serialize_object(serialized_property)
|
59
|
+
end
|
60
|
+
output_object['storageProfile'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.network_profile
|
63
|
+
unless serialized_property.nil?
|
64
|
+
serialized_property = VirtualMachineScaleSetNetworkProfile.serialize_object(serialized_property)
|
65
|
+
end
|
66
|
+
output_object['networkProfile'] = serialized_property unless serialized_property.nil?
|
67
|
+
|
68
|
+
serialized_property = object.extension_profile
|
69
|
+
unless serialized_property.nil?
|
70
|
+
serialized_property = VirtualMachineScaleSetExtensionProfile.serialize_object(serialized_property)
|
71
|
+
end
|
72
|
+
output_object['extensionProfile'] = serialized_property unless serialized_property.nil?
|
73
|
+
|
74
|
+
output_object
|
75
|
+
end
|
76
|
+
|
77
|
+
#
|
78
|
+
# Deserializes given Ruby Hash into Model object.
|
79
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
80
|
+
# @return [VirtualMachineScaleSetVMProfile] Deserialized object.
|
81
|
+
#
|
82
|
+
def self.deserialize_object(object)
|
83
|
+
return if object.nil?
|
84
|
+
output_object = VirtualMachineScaleSetVMProfile.new
|
85
|
+
|
86
|
+
deserialized_property = object['osProfile']
|
87
|
+
unless deserialized_property.nil?
|
88
|
+
deserialized_property = VirtualMachineScaleSetOSProfile.deserialize_object(deserialized_property)
|
89
|
+
end
|
90
|
+
output_object.os_profile = deserialized_property
|
91
|
+
|
92
|
+
deserialized_property = object['storageProfile']
|
93
|
+
unless deserialized_property.nil?
|
94
|
+
deserialized_property = VirtualMachineScaleSetStorageProfile.deserialize_object(deserialized_property)
|
95
|
+
end
|
96
|
+
output_object.storage_profile = deserialized_property
|
97
|
+
|
98
|
+
deserialized_property = object['networkProfile']
|
99
|
+
unless deserialized_property.nil?
|
100
|
+
deserialized_property = VirtualMachineScaleSetNetworkProfile.deserialize_object(deserialized_property)
|
101
|
+
end
|
102
|
+
output_object.network_profile = deserialized_property
|
103
|
+
|
104
|
+
deserialized_property = object['extensionProfile']
|
105
|
+
unless deserialized_property.nil?
|
106
|
+
deserialized_property = VirtualMachineScaleSetExtensionProfile.deserialize_object(deserialized_property)
|
107
|
+
end
|
108
|
+
output_object.extension_profile = deserialized_property
|
109
|
+
|
110
|
+
output_object
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,190 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 scale set virtual machine.
|
10
|
+
#
|
11
|
+
class VirtualMachineScaleSetVMProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Boolean] Specifies whether the latest model has been applied
|
16
|
+
# to the virtual machine.
|
17
|
+
attr_accessor :latest_model_applied
|
18
|
+
|
19
|
+
# @return [VirtualMachineInstanceView] Gets the virtual machine instance
|
20
|
+
# view.
|
21
|
+
attr_accessor :instance_view
|
22
|
+
|
23
|
+
# @return [HardwareProfile] Gets or sets the hardware profile.
|
24
|
+
attr_accessor :hardware_profile
|
25
|
+
|
26
|
+
# @return [StorageProfile] Gets or sets the storage profile.
|
27
|
+
attr_accessor :storage_profile
|
28
|
+
|
29
|
+
# @return [OSProfile] Gets or sets the OS profile.
|
30
|
+
attr_accessor :os_profile
|
31
|
+
|
32
|
+
# @return [NetworkProfile] Gets or sets the network profile.
|
33
|
+
attr_accessor :network_profile
|
34
|
+
|
35
|
+
# @return [DiagnosticsProfile] Gets or sets the diagnostics profile.
|
36
|
+
attr_accessor :diagnostics_profile
|
37
|
+
|
38
|
+
# @return [SubResource] Gets or sets the reference Id of the
|
39
|
+
# availability set to which this virtual machine belongs.
|
40
|
+
attr_accessor :availability_set
|
41
|
+
|
42
|
+
# @return [String] Gets or sets the provisioning state, which only
|
43
|
+
# appears in the response.
|
44
|
+
attr_accessor :provisioning_state
|
45
|
+
|
46
|
+
# @return [String] Gets or sets the license type, which is for bring
|
47
|
+
# your own license scenario.
|
48
|
+
attr_accessor :license_type
|
49
|
+
|
50
|
+
#
|
51
|
+
# Validate the object. Throws ValidationError if validation fails.
|
52
|
+
#
|
53
|
+
def validate
|
54
|
+
@instance_view.validate unless @instance_view.nil?
|
55
|
+
@hardware_profile.validate unless @hardware_profile.nil?
|
56
|
+
@storage_profile.validate unless @storage_profile.nil?
|
57
|
+
@os_profile.validate unless @os_profile.nil?
|
58
|
+
@network_profile.validate unless @network_profile.nil?
|
59
|
+
@diagnostics_profile.validate unless @diagnostics_profile.nil?
|
60
|
+
@availability_set.validate unless @availability_set.nil?
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Serializes given Model object into Ruby Hash.
|
65
|
+
# @param object Model object to serialize.
|
66
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
67
|
+
#
|
68
|
+
def self.serialize_object(object)
|
69
|
+
object.validate
|
70
|
+
output_object = {}
|
71
|
+
|
72
|
+
serialized_property = object.latest_model_applied
|
73
|
+
output_object['latestModelApplied'] = serialized_property unless serialized_property.nil?
|
74
|
+
|
75
|
+
serialized_property = object.instance_view
|
76
|
+
unless serialized_property.nil?
|
77
|
+
serialized_property = VirtualMachineInstanceView.serialize_object(serialized_property)
|
78
|
+
end
|
79
|
+
output_object['instanceView'] = serialized_property unless serialized_property.nil?
|
80
|
+
|
81
|
+
serialized_property = object.hardware_profile
|
82
|
+
unless serialized_property.nil?
|
83
|
+
serialized_property = HardwareProfile.serialize_object(serialized_property)
|
84
|
+
end
|
85
|
+
output_object['hardwareProfile'] = serialized_property unless serialized_property.nil?
|
86
|
+
|
87
|
+
serialized_property = object.storage_profile
|
88
|
+
unless serialized_property.nil?
|
89
|
+
serialized_property = StorageProfile.serialize_object(serialized_property)
|
90
|
+
end
|
91
|
+
output_object['storageProfile'] = serialized_property unless serialized_property.nil?
|
92
|
+
|
93
|
+
serialized_property = object.os_profile
|
94
|
+
unless serialized_property.nil?
|
95
|
+
serialized_property = OSProfile.serialize_object(serialized_property)
|
96
|
+
end
|
97
|
+
output_object['osProfile'] = serialized_property unless serialized_property.nil?
|
98
|
+
|
99
|
+
serialized_property = object.network_profile
|
100
|
+
unless serialized_property.nil?
|
101
|
+
serialized_property = NetworkProfile.serialize_object(serialized_property)
|
102
|
+
end
|
103
|
+
output_object['networkProfile'] = serialized_property unless serialized_property.nil?
|
104
|
+
|
105
|
+
serialized_property = object.diagnostics_profile
|
106
|
+
unless serialized_property.nil?
|
107
|
+
serialized_property = DiagnosticsProfile.serialize_object(serialized_property)
|
108
|
+
end
|
109
|
+
output_object['diagnosticsProfile'] = serialized_property unless serialized_property.nil?
|
110
|
+
|
111
|
+
serialized_property = object.availability_set
|
112
|
+
unless serialized_property.nil?
|
113
|
+
serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property)
|
114
|
+
end
|
115
|
+
output_object['availabilitySet'] = serialized_property unless serialized_property.nil?
|
116
|
+
|
117
|
+
serialized_property = object.provisioning_state
|
118
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
119
|
+
|
120
|
+
serialized_property = object.license_type
|
121
|
+
output_object['licenseType'] = serialized_property unless serialized_property.nil?
|
122
|
+
|
123
|
+
output_object
|
124
|
+
end
|
125
|
+
|
126
|
+
#
|
127
|
+
# Deserializes given Ruby Hash into Model object.
|
128
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
129
|
+
# @return [VirtualMachineScaleSetVMProperties] Deserialized object.
|
130
|
+
#
|
131
|
+
def self.deserialize_object(object)
|
132
|
+
return if object.nil?
|
133
|
+
output_object = VirtualMachineScaleSetVMProperties.new
|
134
|
+
|
135
|
+
deserialized_property = object['latestModelApplied']
|
136
|
+
output_object.latest_model_applied = deserialized_property
|
137
|
+
|
138
|
+
deserialized_property = object['instanceView']
|
139
|
+
unless deserialized_property.nil?
|
140
|
+
deserialized_property = VirtualMachineInstanceView.deserialize_object(deserialized_property)
|
141
|
+
end
|
142
|
+
output_object.instance_view = deserialized_property
|
143
|
+
|
144
|
+
deserialized_property = object['hardwareProfile']
|
145
|
+
unless deserialized_property.nil?
|
146
|
+
deserialized_property = HardwareProfile.deserialize_object(deserialized_property)
|
147
|
+
end
|
148
|
+
output_object.hardware_profile = deserialized_property
|
149
|
+
|
150
|
+
deserialized_property = object['storageProfile']
|
151
|
+
unless deserialized_property.nil?
|
152
|
+
deserialized_property = StorageProfile.deserialize_object(deserialized_property)
|
153
|
+
end
|
154
|
+
output_object.storage_profile = deserialized_property
|
155
|
+
|
156
|
+
deserialized_property = object['osProfile']
|
157
|
+
unless deserialized_property.nil?
|
158
|
+
deserialized_property = OSProfile.deserialize_object(deserialized_property)
|
159
|
+
end
|
160
|
+
output_object.os_profile = deserialized_property
|
161
|
+
|
162
|
+
deserialized_property = object['networkProfile']
|
163
|
+
unless deserialized_property.nil?
|
164
|
+
deserialized_property = NetworkProfile.deserialize_object(deserialized_property)
|
165
|
+
end
|
166
|
+
output_object.network_profile = deserialized_property
|
167
|
+
|
168
|
+
deserialized_property = object['diagnosticsProfile']
|
169
|
+
unless deserialized_property.nil?
|
170
|
+
deserialized_property = DiagnosticsProfile.deserialize_object(deserialized_property)
|
171
|
+
end
|
172
|
+
output_object.diagnostics_profile = deserialized_property
|
173
|
+
|
174
|
+
deserialized_property = object['availabilitySet']
|
175
|
+
unless deserialized_property.nil?
|
176
|
+
deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property)
|
177
|
+
end
|
178
|
+
output_object.availability_set = deserialized_property
|
179
|
+
|
180
|
+
deserialized_property = object['provisioningState']
|
181
|
+
output_object.provisioning_state = deserialized_property
|
182
|
+
|
183
|
+
deserialized_property = object['licenseType']
|
184
|
+
output_object.license_type = deserialized_property
|
185
|
+
|
186
|
+
output_object
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -102,8 +102,6 @@ module Azure::ARM::Compute
|
|
102
102
|
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
103
103
|
output_object.max_data_disk_count = deserialized_property
|
104
104
|
|
105
|
-
output_object.validate
|
106
|
-
|
107
105
|
output_object
|
108
106
|
end
|
109
107
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -59,19 +59,17 @@ module Azure::ARM::Compute
|
|
59
59
|
|
60
60
|
deserialized_property = object['value']
|
61
61
|
unless deserialized_property.nil?
|
62
|
-
|
62
|
+
deserialized_array = []
|
63
63
|
deserialized_property.each do |element1|
|
64
64
|
unless element1.nil?
|
65
65
|
element1 = VirtualMachineSize.deserialize_object(element1)
|
66
66
|
end
|
67
|
-
|
67
|
+
deserialized_array.push(element1)
|
68
68
|
end
|
69
|
-
deserialized_property =
|
69
|
+
deserialized_property = deserialized_array
|
70
70
|
end
|
71
71
|
output_object.value = deserialized_property
|
72
72
|
|
73
|
-
output_object.validate
|
74
|
-
|
75
73
|
output_object
|
76
74
|
end
|
77
75
|
end
|