Class: Azure::ARM::Web::Models::ResourceMetricValue
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::ResourceMetricValue
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/resource_metric_value.rb
Overview
Value of resource metric
Instance Attribute Summary collapse
-
#average ⇒ Float
Value average.
-
#count ⇒ Float
Value count.
-
#maximum ⇒ Float
Value maximum.
-
#minimum ⇒ Float
Value minimum.
-
#time_stamp ⇒ String
Value timestamp.
-
#total ⇒ Float
Value total.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ResourceMetricValue
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
#average ⇒ Float
Returns Value average.
19 20 21 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 19 def average @average end |
#count ⇒ Float
Returns Value count.
31 32 33 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 31 def count @count end |
#maximum ⇒ Float
Returns Value maximum.
25 26 27 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 25 def maximum @maximum end |
#minimum ⇒ Float
Returns Value minimum.
22 23 24 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 22 def minimum @minimum end |
#time_stamp ⇒ String
Returns Value timestamp.
16 17 18 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 16 def time_stamp @time_stamp end |
#total ⇒ Float
Returns Value total.
28 29 30 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 28 def total @total end |
Class Method Details
.deserialize_object(object) ⇒ ResourceMetricValue
Deserializes given Ruby Hash into Model object.
75 76 77 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 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 75 def self.deserialize_object(object) return if object.nil? output_object = ResourceMetricValue.new deserialized_property = object['timeStamp'] output_object.time_stamp = deserialized_property deserialized_property = object['average'] deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty? output_object.average = deserialized_property deserialized_property = object['minimum'] deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty? output_object.minimum = deserialized_property deserialized_property = object['maximum'] deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty? output_object.maximum = deserialized_property deserialized_property = object['total'] deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty? output_object.total = deserialized_property deserialized_property = object['count'] deserialized_property = Float(deserialized_property) unless deserialized_property.to_s.empty? output_object.count = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 45 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.time_stamp output_object['timeStamp'] = serialized_property unless serialized_property.nil? serialized_property = object.average output_object['average'] = serialized_property unless serialized_property.nil? serialized_property = object.minimum output_object['minimum'] = serialized_property unless serialized_property.nil? serialized_property = object.maximum output_object['maximum'] = serialized_property unless serialized_property.nil? serialized_property = object.total output_object['total'] = serialized_property unless serialized_property.nil? serialized_property = object.count output_object['count'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
36 37 38 |
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 36 def validate # Nothing to validate end |