Class: Azure::ARM::Web::Models::ResourceMetricValue

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/resource_metric_value.rb

Overview

Value of resource metric

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#averageFloat

Returns Value average.

Returns:

  • (Float)

    Value average



19
20
21
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 19

def average
  @average
end

#countFloat

Returns Value count.

Returns:

  • (Float)

    Value count



31
32
33
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 31

def count
  @count
end

#maximumFloat

Returns Value maximum.

Returns:

  • (Float)

    Value maximum



25
26
27
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 25

def maximum
  @maximum
end

#minimumFloat

Returns Value minimum.

Returns:

  • (Float)

    Value minimum



22
23
24
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 22

def minimum
  @minimum
end

#time_stampString

Returns Value timestamp.

Returns:

  • (String)

    Value timestamp



16
17
18
# File 'lib/azure_mgmt_web/models/resource_metric_value.rb', line 16

def time_stamp
  @time_stamp
end

#totalFloat

Returns Value total.

Returns:

  • (Float)

    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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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