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,116 @@
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 Extension.
10
+ #
11
+ class VirtualMachineScaleSetExtensionProperties
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 the provisioning state, which only appears in
38
+ # the response.
39
+ attr_accessor :provisioning_state
40
+
41
+ #
42
+ # Validate the object. Throws ValidationError if validation fails.
43
+ #
44
+ def validate
45
+ # Nothing to validate
46
+ end
47
+
48
+ #
49
+ # Serializes given Model object into Ruby Hash.
50
+ # @param object Model object to serialize.
51
+ # @return [Hash] Serialized object in form of Ruby Hash.
52
+ #
53
+ def self.serialize_object(object)
54
+ object.validate
55
+ output_object = {}
56
+
57
+ serialized_property = object.publisher
58
+ output_object['publisher'] = 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.type_handler_version
64
+ output_object['typeHandlerVersion'] = serialized_property unless serialized_property.nil?
65
+
66
+ serialized_property = object.auto_upgrade_minor_version
67
+ output_object['autoUpgradeMinorVersion'] = serialized_property unless serialized_property.nil?
68
+
69
+ serialized_property = object.settings
70
+ output_object['settings'] = serialized_property unless serialized_property.nil?
71
+
72
+ serialized_property = object.protected_settings
73
+ output_object['protectedSettings'] = serialized_property unless serialized_property.nil?
74
+
75
+ serialized_property = object.provisioning_state
76
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
77
+
78
+ output_object
79
+ end
80
+
81
+ #
82
+ # Deserializes given Ruby Hash into Model object.
83
+ # @param object [Hash] Ruby Hash object to deserialize.
84
+ # @return [VirtualMachineScaleSetExtensionProperties] Deserialized
85
+ # object.
86
+ #
87
+ def self.deserialize_object(object)
88
+ return if object.nil?
89
+ output_object = VirtualMachineScaleSetExtensionProperties.new
90
+
91
+ deserialized_property = object['publisher']
92
+ output_object.publisher = deserialized_property
93
+
94
+ deserialized_property = object['type']
95
+ output_object.type = deserialized_property
96
+
97
+ deserialized_property = object['typeHandlerVersion']
98
+ output_object.type_handler_version = deserialized_property
99
+
100
+ deserialized_property = object['autoUpgradeMinorVersion']
101
+ output_object.auto_upgrade_minor_version = deserialized_property
102
+
103
+ deserialized_property = object['settings']
104
+ output_object.settings = deserialized_property
105
+
106
+ deserialized_property = object['protectedSettings']
107
+ output_object.protected_settings = deserialized_property
108
+
109
+ deserialized_property = object['provisioningState']
110
+ output_object.provisioning_state = deserialized_property
111
+
112
+ output_object
113
+ end
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,125 @@
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.
10
+ #
11
+ class VirtualMachineScaleSetInstanceView
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [VirtualMachineScaleSetInstanceViewStatusesSummary] Gets the
16
+ # instance view status summary for the virtual machine scale set.
17
+ attr_accessor :virtual_machine
18
+
19
+ # @return [Array<VirtualMachineScaleSetVMExtensionsSummary>] Gets the
20
+ # extensions information.
21
+ attr_accessor :extensions
22
+
23
+ # @return [Array<InstanceViewStatus>] Gets or sets the resource status
24
+ # information.
25
+ attr_accessor :statuses
26
+
27
+ #
28
+ # Validate the object. Throws ValidationError if validation fails.
29
+ #
30
+ def validate
31
+ @virtual_machine.validate unless @virtual_machine.nil?
32
+ @extensions.each{ |e| e.validate if e.respond_to?(:validate) } unless @extensions.nil?
33
+ @statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.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.virtual_machine
46
+ unless serialized_property.nil?
47
+ serialized_property = VirtualMachineScaleSetInstanceViewStatusesSummary.serialize_object(serialized_property)
48
+ end
49
+ output_object['virtualMachine'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.extensions
52
+ unless serialized_property.nil?
53
+ serializedArray = []
54
+ serialized_property.each do |element|
55
+ unless element.nil?
56
+ element = VirtualMachineScaleSetVMExtensionsSummary.serialize_object(element)
57
+ end
58
+ serializedArray.push(element)
59
+ end
60
+ serialized_property = serializedArray
61
+ end
62
+ output_object['extensions'] = serialized_property unless serialized_property.nil?
63
+
64
+ serialized_property = object.statuses
65
+ unless serialized_property.nil?
66
+ serializedArray = []
67
+ serialized_property.each do |element1|
68
+ unless element1.nil?
69
+ element1 = InstanceViewStatus.serialize_object(element1)
70
+ end
71
+ serializedArray.push(element1)
72
+ end
73
+ serialized_property = serializedArray
74
+ end
75
+ output_object['statuses'] = serialized_property unless serialized_property.nil?
76
+
77
+ output_object
78
+ end
79
+
80
+ #
81
+ # Deserializes given Ruby Hash into Model object.
82
+ # @param object [Hash] Ruby Hash object to deserialize.
83
+ # @return [VirtualMachineScaleSetInstanceView] Deserialized object.
84
+ #
85
+ def self.deserialize_object(object)
86
+ return if object.nil?
87
+ output_object = VirtualMachineScaleSetInstanceView.new
88
+
89
+ deserialized_property = object['virtualMachine']
90
+ unless deserialized_property.nil?
91
+ deserialized_property = VirtualMachineScaleSetInstanceViewStatusesSummary.deserialize_object(deserialized_property)
92
+ end
93
+ output_object.virtual_machine = deserialized_property
94
+
95
+ deserialized_property = object['extensions']
96
+ unless deserialized_property.nil?
97
+ deserialized_array = []
98
+ deserialized_property.each do |element2|
99
+ unless element2.nil?
100
+ element2 = VirtualMachineScaleSetVMExtensionsSummary.deserialize_object(element2)
101
+ end
102
+ deserialized_array.push(element2)
103
+ end
104
+ deserialized_property = deserialized_array
105
+ end
106
+ output_object.extensions = deserialized_property
107
+
108
+ deserialized_property = object['statuses']
109
+ unless deserialized_property.nil?
110
+ deserialized_array = []
111
+ deserialized_property.each do |element3|
112
+ unless element3.nil?
113
+ element3 = InstanceViewStatus.deserialize_object(element3)
114
+ end
115
+ deserialized_array.push(element3)
116
+ end
117
+ deserialized_property = deserialized_array
118
+ end
119
+ output_object.statuses = deserialized_property
120
+
121
+ output_object
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,79 @@
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
+ # Instance view statuses summary for virtual machines of a virtual machine
10
+ # scale set.
11
+ #
12
+ class VirtualMachineScaleSetInstanceViewStatusesSummary
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<VirtualMachineStatusCodeCount>] Gets the extensions
17
+ # information.
18
+ attr_accessor :statuses_summary
19
+
20
+ #
21
+ # Validate the object. Throws ValidationError if validation fails.
22
+ #
23
+ def validate
24
+ @statuses_summary.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses_summary.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.statuses_summary
37
+ unless serialized_property.nil?
38
+ serializedArray = []
39
+ serialized_property.each do |element|
40
+ unless element.nil?
41
+ element = VirtualMachineStatusCodeCount.serialize_object(element)
42
+ end
43
+ serializedArray.push(element)
44
+ end
45
+ serialized_property = serializedArray
46
+ end
47
+ output_object['statusesSummary'] = serialized_property unless serialized_property.nil?
48
+
49
+ output_object
50
+ end
51
+
52
+ #
53
+ # Deserializes given Ruby Hash into Model object.
54
+ # @param object [Hash] Ruby Hash object to deserialize.
55
+ # @return [VirtualMachineScaleSetInstanceViewStatusesSummary]
56
+ # Deserialized object.
57
+ #
58
+ def self.deserialize_object(object)
59
+ return if object.nil?
60
+ output_object = VirtualMachineScaleSetInstanceViewStatusesSummary.new
61
+
62
+ deserialized_property = object['statusesSummary']
63
+ unless deserialized_property.nil?
64
+ deserialized_array = []
65
+ deserialized_property.each do |element1|
66
+ unless element1.nil?
67
+ element1 = VirtualMachineStatusCodeCount.deserialize_object(element1)
68
+ end
69
+ deserialized_array.push(element1)
70
+ end
71
+ deserialized_property = deserialized_array
72
+ end
73
+ output_object.statuses_summary = deserialized_property
74
+
75
+ output_object
76
+ end
77
+ end
78
+ end
79
+ 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 network profile's IP configuration.
10
+ #
11
+ class VirtualMachineScaleSetIPConfiguration < MsRestAzure::SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the IP configuration name.
16
+ attr_accessor :name
17
+
18
+ # @return [VirtualMachineScaleSetIPConfigurationProperties]
19
+ attr_accessor :properties
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ fail MsRest::ValidationError, 'property name is nil' if @name.nil?
26
+ @properties.validate unless @properties.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.id
42
+ output_object['id'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.properties
45
+ unless serialized_property.nil?
46
+ serialized_property = VirtualMachineScaleSetIPConfigurationProperties.serialize_object(serialized_property)
47
+ end
48
+ output_object['properties'] = 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 [VirtualMachineScaleSetIPConfiguration] Deserialized object.
57
+ #
58
+ def self.deserialize_object(object)
59
+ return if object.nil?
60
+ output_object = VirtualMachineScaleSetIPConfiguration.new
61
+
62
+ deserialized_property = object['name']
63
+ output_object.name = deserialized_property
64
+
65
+ deserialized_property = object['id']
66
+ output_object.id = deserialized_property
67
+
68
+ deserialized_property = object['properties']
69
+ unless deserialized_property.nil?
70
+ deserialized_property = VirtualMachineScaleSetIPConfigurationProperties.deserialize_object(deserialized_property)
71
+ end
72
+ output_object.properties = deserialized_property
73
+
74
+ output_object
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,127 @@
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 network profile's IP configuration
10
+ # properties.
11
+ #
12
+ class VirtualMachineScaleSetIPConfigurationProperties
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [ApiEntityReference] Gets or sets the subnet.
17
+ attr_accessor :subnet
18
+
19
+ # @return [Array<SubResource>] Gets or sets the load balancer backend
20
+ # address pools.
21
+ attr_accessor :load_balancer_backend_address_pools
22
+
23
+ # @return [Array<SubResource>] Gets or sets the load balancer inbound
24
+ # nat pools.
25
+ attr_accessor :load_balancer_inbound_nat_pools
26
+
27
+ #
28
+ # Validate the object. Throws ValidationError if validation fails.
29
+ #
30
+ def validate
31
+ fail MsRest::ValidationError, 'property subnet is nil' if @subnet.nil?
32
+ @subnet.validate unless @subnet.nil?
33
+ @load_balancer_backend_address_pools.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancer_backend_address_pools.nil?
34
+ @load_balancer_inbound_nat_pools.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancer_inbound_nat_pools.nil?
35
+ end
36
+
37
+ #
38
+ # Serializes given Model object into Ruby Hash.
39
+ # @param object Model object to serialize.
40
+ # @return [Hash] Serialized object in form of Ruby Hash.
41
+ #
42
+ def self.serialize_object(object)
43
+ object.validate
44
+ output_object = {}
45
+
46
+ serialized_property = object.subnet
47
+ unless serialized_property.nil?
48
+ serialized_property = ApiEntityReference.serialize_object(serialized_property)
49
+ end
50
+ output_object['subnet'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.load_balancer_backend_address_pools
53
+ unless serialized_property.nil?
54
+ serializedArray = []
55
+ serialized_property.each do |element|
56
+ unless element.nil?
57
+ element = MsRestAzure::SubResource.serialize_object(element)
58
+ end
59
+ serializedArray.push(element)
60
+ end
61
+ serialized_property = serializedArray
62
+ end
63
+ output_object['loadBalancerBackendAddressPools'] = serialized_property unless serialized_property.nil?
64
+
65
+ serialized_property = object.load_balancer_inbound_nat_pools
66
+ unless serialized_property.nil?
67
+ serializedArray = []
68
+ serialized_property.each do |element1|
69
+ unless element1.nil?
70
+ element1 = MsRestAzure::SubResource.serialize_object(element1)
71
+ end
72
+ serializedArray.push(element1)
73
+ end
74
+ serialized_property = serializedArray
75
+ end
76
+ output_object['loadBalancerInboundNatPools'] = serialized_property unless serialized_property.nil?
77
+
78
+ output_object
79
+ end
80
+
81
+ #
82
+ # Deserializes given Ruby Hash into Model object.
83
+ # @param object [Hash] Ruby Hash object to deserialize.
84
+ # @return [VirtualMachineScaleSetIPConfigurationProperties] Deserialized
85
+ # object.
86
+ #
87
+ def self.deserialize_object(object)
88
+ return if object.nil?
89
+ output_object = VirtualMachineScaleSetIPConfigurationProperties.new
90
+
91
+ deserialized_property = object['subnet']
92
+ unless deserialized_property.nil?
93
+ deserialized_property = ApiEntityReference.deserialize_object(deserialized_property)
94
+ end
95
+ output_object.subnet = deserialized_property
96
+
97
+ deserialized_property = object['loadBalancerBackendAddressPools']
98
+ unless deserialized_property.nil?
99
+ deserialized_array = []
100
+ deserialized_property.each do |element2|
101
+ unless element2.nil?
102
+ element2 = MsRestAzure::SubResource.deserialize_object(element2)
103
+ end
104
+ deserialized_array.push(element2)
105
+ end
106
+ deserialized_property = deserialized_array
107
+ end
108
+ output_object.load_balancer_backend_address_pools = deserialized_property
109
+
110
+ deserialized_property = object['loadBalancerInboundNatPools']
111
+ unless deserialized_property.nil?
112
+ deserialized_array = []
113
+ deserialized_property.each do |element3|
114
+ unless element3.nil?
115
+ element3 = MsRestAzure::SubResource.deserialize_object(element3)
116
+ end
117
+ deserialized_array.push(element3)
118
+ end
119
+ deserialized_property = deserialized_array
120
+ end
121
+ output_object.load_balancer_inbound_nat_pools = deserialized_property
122
+
123
+ output_object
124
+ end
125
+ end
126
+ end
127
+ 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 operation response.
10
+ #
11
+ class VirtualMachineScaleSetListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<VirtualMachineScaleSet>] Gets or sets the list of
16
+ # virtual machine scale sets.
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 = VirtualMachineScaleSet.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 [VirtualMachineScaleSetListResult] Deserialized object.
55
+ #
56
+ def self.deserialize_object(object)
57
+ return if object.nil?
58
+ output_object = VirtualMachineScaleSetListResult.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 = VirtualMachineScaleSet.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,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 Virtual Machine Scale Set List Skus operation response.
10
+ #
11
+ class VirtualMachineScaleSetListSkusResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<VirtualMachineScaleSetSku>] Gets the list of skus
16
+ # available for the virtual machine scale set.
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 = VirtualMachineScaleSetSku.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 [VirtualMachineScaleSetListSkusResult] Deserialized object.
55
+ #
56
+ def self.deserialize_object(object)
57
+ return if object.nil?
58
+ output_object = VirtualMachineScaleSetListSkusResult.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 = VirtualMachineScaleSetSku.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