Class: UltraVault::RecoveryPoint
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- UltraVault::RecoveryPoint
- Defined in:
- lib/ultravault/data_objects/recovery_point.rb
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
readonly
Returns the value of attribute agent_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#disk_safe_id ⇒ Object
readonly
Returns the value of attribute disk_safe_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
-
.find_all_by_disk_safe_id(disk_safe_id) ⇒ [UltraVault::RecoveryPoint]
Returns an array of recovery points, if found.
Instance Method Summary collapse
-
#initialize(params) ⇒ RecoveryPoint
constructor
A new instance of RecoveryPoint.
Constructor Details
#initialize(params) ⇒ RecoveryPoint
Returns a new instance of RecoveryPoint.
6 7 8 9 10 11 12 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 6 def initialize(params) @agent_id = params[:agent_id] @created_at = Time.at(params[:created_on_timestamp_in_millis].to_i / 1000.0) @disk_safe_id = params[:disk_safe_id] @id = params[:recovery_point_id] @state = params[:recovery_point_state].downcase end |
Instance Attribute Details
#agent_id ⇒ Object (readonly)
Returns the value of attribute agent_id.
3 4 5 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3 def agent_id @agent_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3 def created_at @created_at end |
#disk_safe_id ⇒ Object (readonly)
Returns the value of attribute disk_safe_id.
3 4 5 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3 def disk_safe_id @disk_safe_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3 def id @id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3 def state @state end |
Class Method Details
.find_all_by_disk_safe_id(disk_safe_id) ⇒ [UltraVault::RecoveryPoint]
Returns an array of recovery points, if found.
19 20 21 |
# File 'lib/ultravault/data_objects/recovery_point.rb', line 19 def self.find_all_by_disk_safe_id(disk_safe_id) UltraVault::RecoveryPointService.new.find_recovery_points_by_disk_safe_id(disk_safe_id) end |