Class: Azure::ARM::Compute::Models::VirtualMachineSize

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_compute/models/virtual_machine_size.rb

Overview

Describes the properties of a VM size.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#max_data_disk_countInteger

allowed by a VM size.

Returns:

  • (Integer)

    Gets or sets the Maximum number of data disks



34
35
36
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 34

def max_data_disk_count
  @max_data_disk_count
end

#memory_in_mbInteger

Returns Gets or sets the Memory size supported by a VM size.

Returns:

  • (Integer)

    Gets or sets the Memory size supported by a VM size.



30
31
32
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 30

def memory_in_mb
  @memory_in_mb
end

#nameString

Returns Gets or sets the VM size name.

Returns:

  • (String)

    Gets or sets the VM size name.



16
17
18
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 16

def name
  @name
end

#number_of_coresInteger

size.

Returns:

  • (Integer)

    Gets or sets the Number of cores supported by a VM



20
21
22
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 20

def number_of_cores
  @number_of_cores
end

#os_disk_size_in_mbInteger

Returns Gets or sets the OS disk size allowed by a VM size.

Returns:

  • (Integer)

    Gets or sets the OS disk size allowed by a VM size.



23
24
25
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 23

def os_disk_size_in_mb
  @os_disk_size_in_mb
end

#resource_disk_size_in_mbInteger

size.

Returns:

  • (Integer)

    Gets or sets the Resource disk size allowed by a VM



27
28
29
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 27

def resource_disk_size_in_mb
  @resource_disk_size_in_mb
end

Class Method Details

.deserialize_object(object) ⇒ VirtualMachineSize

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 78

def self.deserialize_object(object)
  return if object.nil?
  output_object = VirtualMachineSize.new

  deserialized_property = object['name']
  output_object.name = deserialized_property

  deserialized_property = object['numberOfCores']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.number_of_cores = deserialized_property

  deserialized_property = object['osDiskSizeInMB']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.os_disk_size_in_mb = deserialized_property

  deserialized_property = object['resourceDiskSizeInMB']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.resource_disk_size_in_mb = deserialized_property

  deserialized_property = object['memoryInMB']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.memory_in_mb = deserialized_property

  deserialized_property = object['maxDataDiskCount']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.max_data_disk_count = deserialized_property

  output_object.validate

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 48

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.name
  output_object['name'] = serialized_property unless serialized_property.nil?

  serialized_property = object.number_of_cores
  output_object['numberOfCores'] = serialized_property unless serialized_property.nil?

  serialized_property = object.os_disk_size_in_mb
  output_object['osDiskSizeInMB'] = serialized_property unless serialized_property.nil?

  serialized_property = object.resource_disk_size_in_mb
  output_object['resourceDiskSizeInMB'] = serialized_property unless serialized_property.nil?

  serialized_property = object.memory_in_mb
  output_object['memoryInMB'] = serialized_property unless serialized_property.nil?

  serialized_property = object.max_data_disk_count
  output_object['maxDataDiskCount'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



39
40
41
# File 'lib/azure_mgmt_compute/models/virtual_machine_size.rb', line 39

def validate
  # Nothing to validate
end