Class: Appwrite::Models::UsageGauge
- Inherits:
-
Object
- Object
- Appwrite::Models::UsageGauge
- Defined in:
- lib/appwrite/models/usage_gauge.rb
Instance Attribute Summary collapse
-
#metric ⇒ Object
readonly
Returns the value of attribute metric.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric:, value:, time:, resource_type:, resource_id:) ⇒ UsageGauge
constructor
A new instance of UsageGauge.
- #to_map ⇒ Object
Constructor Details
#initialize(metric:, value:, time:, resource_type:, resource_id:) ⇒ UsageGauge
Returns a new instance of UsageGauge.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/appwrite/models/usage_gauge.rb', line 12 def initialize( metric:, value:, time:, resource_type:, resource_id: ) @metric = metric @value = value @time = time @resource_type = resource_type @resource_id = resource_id end |
Instance Attribute Details
#metric ⇒ Object (readonly)
Returns the value of attribute metric.
6 7 8 |
# File 'lib/appwrite/models/usage_gauge.rb', line 6 def metric @metric end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
10 11 12 |
# File 'lib/appwrite/models/usage_gauge.rb', line 10 def resource_id @resource_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
9 10 11 |
# File 'lib/appwrite/models/usage_gauge.rb', line 9 def resource_type @resource_type end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
8 9 10 |
# File 'lib/appwrite/models/usage_gauge.rb', line 8 def time @time end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/appwrite/models/usage_gauge.rb', line 7 def value @value end |
Class Method Details
.from(map:) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/appwrite/models/usage_gauge.rb', line 26 def self.from(map:) UsageGauge.new( metric: map["metric"], value: map["value"], time: map["time"], resource_type: map["resourceType"], resource_id: map["resourceId"] ) end |
Instance Method Details
#to_map ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/appwrite/models/usage_gauge.rb', line 36 def to_map { "metric": @metric, "value": @value, "time": @time, "resourceType": @resource_type, "resourceId": @resource_id } end |