Class: Azure::ARM::Compute::Models::ListUsagesResult
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::ListUsagesResult
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/list_usages_result.rb
Overview
The List Usages operation response.
Instance Attribute Summary collapse
-
#value ⇒ Array<Usage>
Gets or sets the list Compute Resource Usages.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ListUsagesResult
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#value ⇒ Array<Usage>
Returns Gets or sets the list Compute Resource Usages.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/list_usages_result.rb', line 16 def value @value end |
Class Method Details
.deserialize_object(object) ⇒ ListUsagesResult
Deserializes given Ruby Hash into Model object.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/azure_mgmt_compute/models/list_usages_result.rb', line 55 def self.deserialize_object(object) return if object.nil? output_object = ListUsagesResult.new deserialized_property = object['value'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element1| unless element1.nil? element1 = Usage.deserialize_object(element1) end deserializedArray.push(element1); end deserialized_property = deserializedArray; end output_object.value = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/azure_mgmt_compute/models/list_usages_result.rb', line 30 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.value unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = Usage.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['value'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
21 22 23 |
# File 'lib/azure_mgmt_compute/models/list_usages_result.rb', line 21 def validate @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil? end |