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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/azure_mgmt_compute.gemspec +3 -11
  3. data/lib/azure_mgmt_compute/availability_sets.rb +226 -241
  4. data/lib/azure_mgmt_compute/compute_management_client.rb +26 -11
  5. data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +8 -11
  6. data/lib/azure_mgmt_compute/models/api_entity_reference.rb +58 -0
  7. data/lib/azure_mgmt_compute/models/api_error.rb +4 -6
  8. data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -3
  9. data/lib/azure_mgmt_compute/models/availability_set.rb +1 -3
  10. data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +4 -6
  11. data/lib/azure_mgmt_compute/models/availability_set_properties.rb +9 -11
  12. data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +67 -0
  13. data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +65 -0
  14. data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
  15. data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
  16. data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -3
  17. data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +3 -6
  18. data/lib/azure_mgmt_compute/models/compute_operation_status.rb +1 -1
  19. data/lib/azure_mgmt_compute/models/data_disk.rb +27 -26
  20. data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -3
  21. data/lib/azure_mgmt_compute/models/delete_operation_result.rb +6 -5
  22. data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +62 -0
  23. data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
  24. data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +81 -0
  25. data/lib/azure_mgmt_compute/models/disk_instance_view.rb +4 -6
  26. data/lib/azure_mgmt_compute/models/hardware_profile.rb +15 -9
  27. data/lib/azure_mgmt_compute/models/image_reference.rb +1 -3
  28. data/lib/azure_mgmt_compute/models/inner_error.rb +1 -3
  29. data/lib/azure_mgmt_compute/models/instance_view_status.rb +3 -5
  30. data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +74 -0
  31. data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +75 -0
  32. data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -3
  33. data/lib/azure_mgmt_compute/models/list_usages_result.rb +4 -6
  34. data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -3
  35. data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -3
  36. data/lib/azure_mgmt_compute/models/network_profile.rb +4 -6
  37. data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
  38. data/lib/azure_mgmt_compute/models/operation_status.rb +1 -1
  39. data/lib/azure_mgmt_compute/models/osdisk.rb +54 -26
  40. data/lib/azure_mgmt_compute/models/osdisk_image.rb +4 -6
  41. data/lib/azure_mgmt_compute/models/osprofile.rb +4 -6
  42. data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
  43. data/lib/azure_mgmt_compute/models/plan.rb +1 -3
  44. data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
  45. data/lib/azure_mgmt_compute/models/purchase_plan.rb +4 -4
  46. data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
  47. data/lib/azure_mgmt_compute/models/sku.rb +75 -0
  48. data/lib/azure_mgmt_compute/models/ssh_configuration.rb +4 -6
  49. data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -3
  50. data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
  51. data/lib/azure_mgmt_compute/models/storage_profile.rb +4 -6
  52. data/lib/azure_mgmt_compute/models/{usage_unit.rb → upgrade_mode.rb} +5 -4
  53. data/lib/azure_mgmt_compute/models/upgrade_policy.rb +60 -0
  54. data/lib/azure_mgmt_compute/models/usage.rb +7 -9
  55. data/lib/azure_mgmt_compute/models/usage_name.rb +1 -3
  56. data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -3
  57. data/lib/azure_mgmt_compute/models/vault_secret_group.rb +6 -8
  58. data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -3
  59. data/lib/azure_mgmt_compute/models/virtual_machine.rb +4 -6
  60. data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +7 -9
  61. data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +4 -4
  62. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +68 -0
  63. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +56 -0
  64. data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -3
  65. data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -3
  66. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +15 -15
  67. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +4 -4
  68. data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +7 -9
  69. data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -3
  70. data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +15 -15
  71. data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +4 -6
  72. data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +9 -9
  73. data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +28 -14
  74. data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -6
  75. data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +29 -5
  76. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +108 -0
  77. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +77 -0
  78. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +77 -0
  79. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +116 -0
  80. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +125 -0
  81. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +79 -0
  82. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +78 -0
  83. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +127 -0
  84. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +77 -0
  85. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +77 -0
  86. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +88 -0
  87. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +80 -0
  88. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +89 -0
  89. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +77 -0
  90. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +129 -0
  91. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +147 -0
  92. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +89 -0
  93. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +88 -0
  94. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +90 -0
  95. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  96. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +78 -0
  97. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +165 -0
  98. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +87 -0
  99. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  100. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +59 -0
  101. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +202 -0
  102. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +77 -0
  103. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +114 -0
  104. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +190 -0
  105. data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -3
  106. data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +4 -6
  107. data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +53 -45
  108. data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +68 -0
  109. data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +4 -6
  110. data/lib/azure_mgmt_compute/models/win_rmlistener.rb +3 -5
  111. data/lib/azure_mgmt_compute/models/windows_configuration.rb +4 -6
  112. data/lib/azure_mgmt_compute/module_definition.rb +5 -3
  113. data/lib/azure_mgmt_compute/usage_operations.rb +75 -42
  114. data/lib/azure_mgmt_compute/version.rb +5 -3
  115. data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +71 -158
  116. data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +66 -149
  117. data/lib/azure_mgmt_compute/virtual_machine_images.rb +121 -264
  118. data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +750 -0
  119. data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +1327 -0
  120. data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +75 -42
  121. data/lib/azure_mgmt_compute/virtual_machines.rb +397 -623
  122. data/lib/azure_mgmt_compute.rb +57 -18
  123. metadata +50 -128
  124. data/.gitignore +0 -10
  125. data/.travis.yml +0 -3
  126. data/Gemfile +0 -17
@@ -0,0 +1,89 @@
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.
10
+ #
11
+ class VirtualMachineScaleSetProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [UpgradePolicy] Gets or sets the upgrade policy.
16
+ attr_accessor :upgrade_policy
17
+
18
+ # @return [VirtualMachineScaleSetVMProfile] Gets or sets the virtual
19
+ # machine profile.
20
+ attr_accessor :virtual_machine_profile
21
+
22
+ # @return [String] Gets or sets the provisioning state, which only
23
+ # appears in the response.
24
+ attr_accessor :provisioning_state
25
+
26
+ #
27
+ # Validate the object. Throws ValidationError if validation fails.
28
+ #
29
+ def validate
30
+ @upgrade_policy.validate unless @upgrade_policy.nil?
31
+ @virtual_machine_profile.validate unless @virtual_machine_profile.nil?
32
+ end
33
+
34
+ #
35
+ # Serializes given Model object into Ruby Hash.
36
+ # @param object Model object to serialize.
37
+ # @return [Hash] Serialized object in form of Ruby Hash.
38
+ #
39
+ def self.serialize_object(object)
40
+ object.validate
41
+ output_object = {}
42
+
43
+ serialized_property = object.upgrade_policy
44
+ unless serialized_property.nil?
45
+ serialized_property = UpgradePolicy.serialize_object(serialized_property)
46
+ end
47
+ output_object['upgradePolicy'] = serialized_property unless serialized_property.nil?
48
+
49
+ serialized_property = object.virtual_machine_profile
50
+ unless serialized_property.nil?
51
+ serialized_property = VirtualMachineScaleSetVMProfile.serialize_object(serialized_property)
52
+ end
53
+ output_object['virtualMachineProfile'] = serialized_property unless serialized_property.nil?
54
+
55
+ serialized_property = object.provisioning_state
56
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
57
+
58
+ output_object
59
+ end
60
+
61
+ #
62
+ # Deserializes given Ruby Hash into Model object.
63
+ # @param object [Hash] Ruby Hash object to deserialize.
64
+ # @return [VirtualMachineScaleSetProperties] Deserialized object.
65
+ #
66
+ def self.deserialize_object(object)
67
+ return if object.nil?
68
+ output_object = VirtualMachineScaleSetProperties.new
69
+
70
+ deserialized_property = object['upgradePolicy']
71
+ unless deserialized_property.nil?
72
+ deserialized_property = UpgradePolicy.deserialize_object(deserialized_property)
73
+ end
74
+ output_object.upgrade_policy = deserialized_property
75
+
76
+ deserialized_property = object['virtualMachineProfile']
77
+ unless deserialized_property.nil?
78
+ deserialized_property = VirtualMachineScaleSetVMProfile.deserialize_object(deserialized_property)
79
+ end
80
+ output_object.virtual_machine_profile = deserialized_property
81
+
82
+ deserialized_property = object['provisioningState']
83
+ output_object.provisioning_state = deserialized_property
84
+
85
+ output_object
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,88 @@
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 an available virtual machine scale set sku.
10
+ #
11
+ class VirtualMachineScaleSetSku
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets the type of resource the sku applies to.
16
+ attr_accessor :resource_type
17
+
18
+ # @return [Sku] Gets the Sku.
19
+ attr_accessor :sku
20
+
21
+ # @return [VirtualMachineScaleSetSkuCapacity] Gets available scaling
22
+ # information.
23
+ attr_accessor :capacity
24
+
25
+ #
26
+ # Validate the object. Throws ValidationError if validation fails.
27
+ #
28
+ def validate
29
+ @sku.validate unless @sku.nil?
30
+ @capacity.validate unless @capacity.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.resource_type
43
+ output_object['resourceType'] = serialized_property unless serialized_property.nil?
44
+
45
+ serialized_property = object.sku
46
+ unless serialized_property.nil?
47
+ serialized_property = Sku.serialize_object(serialized_property)
48
+ end
49
+ output_object['sku'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.capacity
52
+ unless serialized_property.nil?
53
+ serialized_property = VirtualMachineScaleSetSkuCapacity.serialize_object(serialized_property)
54
+ end
55
+ output_object['capacity'] = serialized_property unless serialized_property.nil?
56
+
57
+ output_object
58
+ end
59
+
60
+ #
61
+ # Deserializes given Ruby Hash into Model object.
62
+ # @param object [Hash] Ruby Hash object to deserialize.
63
+ # @return [VirtualMachineScaleSetSku] Deserialized object.
64
+ #
65
+ def self.deserialize_object(object)
66
+ return if object.nil?
67
+ output_object = VirtualMachineScaleSetSku.new
68
+
69
+ deserialized_property = object['resourceType']
70
+ output_object.resource_type = deserialized_property
71
+
72
+ deserialized_property = object['sku']
73
+ unless deserialized_property.nil?
74
+ deserialized_property = Sku.deserialize_object(deserialized_property)
75
+ end
76
+ output_object.sku = deserialized_property
77
+
78
+ deserialized_property = object['capacity']
79
+ unless deserialized_property.nil?
80
+ deserialized_property = VirtualMachineScaleSetSkuCapacity.deserialize_object(deserialized_property)
81
+ end
82
+ output_object.capacity = deserialized_property
83
+
84
+ output_object
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,90 @@
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 scaling information of a sku.
10
+ #
11
+ class VirtualMachineScaleSetSkuCapacity
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Integer] Gets the minimum capacity.
16
+ attr_accessor :minimum
17
+
18
+ # @return [Integer] Gets the maximum capacity that can be set.
19
+ attr_accessor :maximum
20
+
21
+ # @return [Integer] Gets the default capacity.
22
+ attr_accessor :default_capacity
23
+
24
+ # @return [VirtualMachineScaleSetSkuScaleType] Gets the scale type
25
+ # applicable to the sku. Possible values include: 'Automatic', 'None'
26
+ attr_accessor :scale_type
27
+
28
+ #
29
+ # Validate the object. Throws ValidationError if validation fails.
30
+ #
31
+ def validate
32
+ end
33
+
34
+ #
35
+ # Serializes given Model object into Ruby Hash.
36
+ # @param object Model object to serialize.
37
+ # @return [Hash] Serialized object in form of Ruby Hash.
38
+ #
39
+ def self.serialize_object(object)
40
+ object.validate
41
+ output_object = {}
42
+
43
+ serialized_property = object.minimum
44
+ output_object['minimum'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.maximum
47
+ output_object['maximum'] = serialized_property unless serialized_property.nil?
48
+
49
+ serialized_property = object.default_capacity
50
+ output_object['defaultCapacity'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.scale_type
53
+ output_object['scaleType'] = serialized_property unless serialized_property.nil?
54
+
55
+ output_object
56
+ end
57
+
58
+ #
59
+ # Deserializes given Ruby Hash into Model object.
60
+ # @param object [Hash] Ruby Hash object to deserialize.
61
+ # @return [VirtualMachineScaleSetSkuCapacity] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = VirtualMachineScaleSetSkuCapacity.new
66
+
67
+ deserialized_property = object['minimum']
68
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
69
+ output_object.minimum = deserialized_property
70
+
71
+ deserialized_property = object['maximum']
72
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
73
+ output_object.maximum = deserialized_property
74
+
75
+ deserialized_property = object['defaultCapacity']
76
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
77
+ output_object.default_capacity = deserialized_property
78
+
79
+ deserialized_property = object['scaleType']
80
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
81
+ enum_is_valid = VirtualMachineScaleSetSkuScaleType.constants.any? { |e| VirtualMachineScaleSetSkuScaleType.const_get(e).to_s.downcase == deserialized_property.downcase }
82
+ warn 'Enum VirtualMachineScaleSetSkuScaleType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
83
+ end
84
+ output_object.scale_type = deserialized_property
85
+
86
+ output_object
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,16 @@
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
+ # Defines values for VirtualMachineScaleSetSkuScaleType
10
+ #
11
+ module VirtualMachineScaleSetSkuScaleType
12
+ Automatic = "Automatic"
13
+ None = "None"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,78 @@
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 storage profile.
10
+ #
11
+ class VirtualMachineScaleSetStorageProfile
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ImageReference] Gets or sets the image reference.
16
+ attr_accessor :image_reference
17
+
18
+ # @return [VirtualMachineScaleSetOSDisk] Gets or sets the OS disk.
19
+ attr_accessor :os_disk
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ @image_reference.validate unless @image_reference.nil?
26
+ @os_disk.validate unless @os_disk.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.image_reference
39
+ unless serialized_property.nil?
40
+ serialized_property = ImageReference.serialize_object(serialized_property)
41
+ end
42
+ output_object['imageReference'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.os_disk
45
+ unless serialized_property.nil?
46
+ serialized_property = VirtualMachineScaleSetOSDisk.serialize_object(serialized_property)
47
+ end
48
+ output_object['osDisk'] = serialized_property unless serialized_property.nil?
49
+
50
+ output_object
51
+ end
52
+
53
+ #
54
+ # Deserializes given Ruby Hash into Model object.
55
+ # @param object [Hash] Ruby Hash object to deserialize.
56
+ # @return [VirtualMachineScaleSetStorageProfile] Deserialized object.
57
+ #
58
+ def self.deserialize_object(object)
59
+ return if object.nil?
60
+ output_object = VirtualMachineScaleSetStorageProfile.new
61
+
62
+ deserialized_property = object['imageReference']
63
+ unless deserialized_property.nil?
64
+ deserialized_property = ImageReference.deserialize_object(deserialized_property)
65
+ end
66
+ output_object.image_reference = deserialized_property
67
+
68
+ deserialized_property = object['osDisk']
69
+ unless deserialized_property.nil?
70
+ deserialized_property = VirtualMachineScaleSetOSDisk.deserialize_object(deserialized_property)
71
+ end
72
+ output_object.os_disk = deserialized_property
73
+
74
+ output_object
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,165 @@
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.
10
+ #
11
+ class VirtualMachineScaleSetVM < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets the virtual machine instance id.
16
+ attr_accessor :instance_id
17
+
18
+ # @return [Sku] Gets the virtual machine sku.
19
+ attr_accessor :sku
20
+
21
+ # @return [VirtualMachineScaleSetVMProperties]
22
+ attr_accessor :properties
23
+
24
+ # @return [Plan] Gets or sets the purchase plan when deploying virtual
25
+ # machine from VM Marketplace images.
26
+ attr_accessor :plan
27
+
28
+ # @return [Array<VirtualMachineExtension>] Gets the virtual machine
29
+ # child extension resources.
30
+ attr_accessor :resources
31
+
32
+ #
33
+ # Validate the object. Throws ValidationError if validation fails.
34
+ #
35
+ def validate
36
+ @sku.validate unless @sku.nil?
37
+ @properties.validate unless @properties.nil?
38
+ @plan.validate unless @plan.nil?
39
+ @resources.each{ |e| e.validate if e.respond_to?(:validate) } unless @resources.nil?
40
+ end
41
+
42
+ #
43
+ # Serializes given Model object into Ruby Hash.
44
+ # @param object Model object to serialize.
45
+ # @return [Hash] Serialized object in form of Ruby Hash.
46
+ #
47
+ def self.serialize_object(object)
48
+ object.validate
49
+ output_object = {}
50
+
51
+ serialized_property = object.location
52
+ output_object['location'] = serialized_property unless serialized_property.nil?
53
+
54
+ serialized_property = object.id
55
+ output_object['id'] = serialized_property unless serialized_property.nil?
56
+
57
+ serialized_property = object.name
58
+ output_object['name'] = serialized_property unless serialized_property.nil?
59
+
60
+ serialized_property = object.type
61
+ output_object['type'] = serialized_property unless serialized_property.nil?
62
+
63
+ serialized_property = object.tags
64
+ output_object['tags'] = serialized_property unless serialized_property.nil?
65
+
66
+ serialized_property = object.instance_id
67
+ output_object['instanceId'] = serialized_property unless serialized_property.nil?
68
+
69
+ serialized_property = object.sku
70
+ unless serialized_property.nil?
71
+ serialized_property = Sku.serialize_object(serialized_property)
72
+ end
73
+ output_object['sku'] = serialized_property unless serialized_property.nil?
74
+
75
+ serialized_property = object.properties
76
+ unless serialized_property.nil?
77
+ serialized_property = VirtualMachineScaleSetVMProperties.serialize_object(serialized_property)
78
+ end
79
+ output_object['properties'] = serialized_property unless serialized_property.nil?
80
+
81
+ serialized_property = object.plan
82
+ unless serialized_property.nil?
83
+ serialized_property = Plan.serialize_object(serialized_property)
84
+ end
85
+ output_object['plan'] = serialized_property unless serialized_property.nil?
86
+
87
+ serialized_property = object.resources
88
+ unless serialized_property.nil?
89
+ serializedArray = []
90
+ serialized_property.each do |element|
91
+ unless element.nil?
92
+ element = VirtualMachineExtension.serialize_object(element)
93
+ end
94
+ serializedArray.push(element)
95
+ end
96
+ serialized_property = serializedArray
97
+ end
98
+ output_object['resources'] = serialized_property unless serialized_property.nil?
99
+
100
+ output_object
101
+ end
102
+
103
+ #
104
+ # Deserializes given Ruby Hash into Model object.
105
+ # @param object [Hash] Ruby Hash object to deserialize.
106
+ # @return [VirtualMachineScaleSetVM] Deserialized object.
107
+ #
108
+ def self.deserialize_object(object)
109
+ return if object.nil?
110
+ output_object = VirtualMachineScaleSetVM.new
111
+
112
+ deserialized_property = object['location']
113
+ output_object.location = deserialized_property
114
+
115
+ deserialized_property = object['id']
116
+ output_object.id = deserialized_property
117
+
118
+ deserialized_property = object['name']
119
+ output_object.name = deserialized_property
120
+
121
+ deserialized_property = object['type']
122
+ output_object.type = deserialized_property
123
+
124
+ deserialized_property = object['tags']
125
+ output_object.tags = deserialized_property
126
+
127
+ deserialized_property = object['instanceId']
128
+ output_object.instance_id = deserialized_property
129
+
130
+ deserialized_property = object['sku']
131
+ unless deserialized_property.nil?
132
+ deserialized_property = Sku.deserialize_object(deserialized_property)
133
+ end
134
+ output_object.sku = deserialized_property
135
+
136
+ deserialized_property = object['properties']
137
+ unless deserialized_property.nil?
138
+ deserialized_property = VirtualMachineScaleSetVMProperties.deserialize_object(deserialized_property)
139
+ end
140
+ output_object.properties = deserialized_property
141
+
142
+ deserialized_property = object['plan']
143
+ unless deserialized_property.nil?
144
+ deserialized_property = Plan.deserialize_object(deserialized_property)
145
+ end
146
+ output_object.plan = deserialized_property
147
+
148
+ deserialized_property = object['resources']
149
+ unless deserialized_property.nil?
150
+ deserialized_array = []
151
+ deserialized_property.each do |element1|
152
+ unless element1.nil?
153
+ element1 = VirtualMachineExtension.deserialize_object(element1)
154
+ end
155
+ deserialized_array.push(element1)
156
+ end
157
+ deserialized_property = deserialized_array
158
+ end
159
+ output_object.resources = deserialized_property
160
+
161
+ output_object
162
+ end
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,87 @@
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
+ # Extensions summary for virtual machines of a virtual machine scale set.
10
+ #
11
+ class VirtualMachineScaleSetVMExtensionsSummary
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets the extension name.
16
+ attr_accessor :name
17
+
18
+ # @return [Array<VirtualMachineStatusCodeCount>] Gets the extensions
19
+ # information.
20
+ attr_accessor :statuses_summary
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @statuses_summary.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses_summary.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.name
39
+ output_object['name'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.statuses_summary
42
+ unless serialized_property.nil?
43
+ serializedArray = []
44
+ serialized_property.each do |element|
45
+ unless element.nil?
46
+ element = VirtualMachineStatusCodeCount.serialize_object(element)
47
+ end
48
+ serializedArray.push(element)
49
+ end
50
+ serialized_property = serializedArray
51
+ end
52
+ output_object['statusesSummary'] = serialized_property unless serialized_property.nil?
53
+
54
+ output_object
55
+ end
56
+
57
+ #
58
+ # Deserializes given Ruby Hash into Model object.
59
+ # @param object [Hash] Ruby Hash object to deserialize.
60
+ # @return [VirtualMachineScaleSetVMExtensionsSummary] Deserialized
61
+ # object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = VirtualMachineScaleSetVMExtensionsSummary.new
66
+
67
+ deserialized_property = object['name']
68
+ output_object.name = deserialized_property
69
+
70
+ deserialized_property = object['statusesSummary']
71
+ unless deserialized_property.nil?
72
+ deserialized_array = []
73
+ deserialized_property.each do |element1|
74
+ unless element1.nil?
75
+ element1 = VirtualMachineStatusCodeCount.deserialize_object(element1)
76
+ end
77
+ deserialized_array.push(element1)
78
+ end
79
+ deserialized_property = deserialized_array
80
+ end
81
+ output_object.statuses_summary = deserialized_property
82
+
83
+ output_object
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,57 @@
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 VirtualMachineScaleSetVMInstanceIDs
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
+ @instance_ids.each{ |e| e.validate if e.respond_to?(:validate) } unless @instance_ids.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.instance_ids
36
+ output_object['instanceIds'] = serialized_property unless serialized_property.nil?
37
+
38
+ output_object
39
+ end
40
+
41
+ #
42
+ # Deserializes given Ruby Hash into Model object.
43
+ # @param object [Hash] Ruby Hash object to deserialize.
44
+ # @return [VirtualMachineScaleSetVMInstanceIDs] Deserialized object.
45
+ #
46
+ def self.deserialize_object(object)
47
+ return if object.nil?
48
+ output_object = VirtualMachineScaleSetVMInstanceIDs.new
49
+
50
+ deserialized_property = object['instanceIds']
51
+ output_object.instance_ids = deserialized_property
52
+
53
+ output_object
54
+ end
55
+ end
56
+ end
57
+ end