Class: UltraVault::RecoveryPoint

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/ultravault/data_objects/recovery_point.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_idObject (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_atObject (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_idObject (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

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/ultravault/data_objects/recovery_point.rb', line 3

def id
  @id
end

#stateObject (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.

Parameters:

  • disk_safe_id (String)

    the UUID of the disk safe

Returns:

Raises:

  • (Savon::SOAP::Fault)

    errors from the soap transaction



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