Class: Saklient::Cloud::Resources::ServerActivitySample
- Inherits:
-
Object
- Object
- Saklient::Cloud::Resources::ServerActivitySample
- Defined in:
- lib/saklient/cloud/resources/server_activity_sample.rb
Instance Attribute Summary collapse
-
#at ⇒ NativeDate
readonly
記録日時.
-
#cpu_time ⇒ Float
readonly
CPU時間.
-
#is_available ⇒ bool
readonly
有効な値のとき真.
Instance Method Summary collapse
- #get_at ⇒ NativeDate
- #get_cpu_time ⇒ Float
- #get_is_available ⇒ bool
-
#initialize(atStr, data) ⇒ ServerActivitySample
constructor
A new instance of ServerActivitySample.
Constructor Details
#initialize(atStr, data) ⇒ ServerActivitySample
Returns a new instance of ServerActivitySample.
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 85 def initialize(atStr, data) Saklient::Util::validate_type(atStr, 'String') @_at = Saklient::Util::str2date(atStr) @_is_available = false v = data['CPU-TIME'.to_sym] if !(v).nil? @_is_available = true @_cpu_time = v end end |
Instance Attribute Details
#at ⇒ NativeDate (readonly)
記録日時
31 32 33 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 31 def at @at end |
#cpu_time ⇒ Float (readonly)
CPU時間
77 78 79 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 77 def cpu_time @cpu_time end |
#is_available ⇒ bool (readonly)
有効な値のとき真
54 55 56 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 54 def is_available @is_available end |
Instance Method Details
#get_at ⇒ NativeDate
24 25 26 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 24 def get_at return @_at end |
#get_cpu_time ⇒ Float
70 71 72 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 70 def get_cpu_time return @_cpu_time end |
#get_is_available ⇒ bool
47 48 49 |
# File 'lib/saklient/cloud/resources/server_activity_sample.rb', line 47 def get_is_available return @_is_available end |