Class: Daytona::Volume

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/volume.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(volume_dto) ⇒ Volume

Initialize volume from DTO

Parameters:

  • volume_dto (DaytonaApiClient::SandboxVolume)


32
33
34
35
36
37
38
39
40
41
# File 'lib/daytona/volume.rb', line 32

def initialize(volume_dto)
  @id = volume_dto.id
  @name = volume_dto.name
  @organization_id = volume_dto.organization_id
  @state = volume_dto.state
  @created_at = volume_dto.created_at
  @updated_at = volume_dto.updated_at
  @last_used_at = volume_dto.last_used_at
  @error_reason = volume_dto.error_reason
end

Instance Attribute Details

#created_atString (readonly)

Returns:

  • (String)


18
19
20
# File 'lib/daytona/volume.rb', line 18

def created_at
  @created_at
end

#error_reasonString? (readonly)

Returns:

  • (String, nil)


27
28
29
# File 'lib/daytona/volume.rb', line 27

def error_reason
  @error_reason
end

#idString (readonly)

Returns:

  • (String)


6
7
8
# File 'lib/daytona/volume.rb', line 6

def id
  @id
end

#last_used_atString (readonly)

Returns:

  • (String)


24
25
26
# File 'lib/daytona/volume.rb', line 24

def last_used_at
  @last_used_at
end

#nameString (readonly)

Returns:

  • (String)


9
10
11
# File 'lib/daytona/volume.rb', line 9

def name
  @name
end

#organization_idString (readonly)

Returns:

  • (String)


12
13
14
# File 'lib/daytona/volume.rb', line 12

def organization_id
  @organization_id
end

#stateString (readonly)

Returns:

  • (String)


15
16
17
# File 'lib/daytona/volume.rb', line 15

def state
  @state
end

#updated_atString (readonly)

Returns:

  • (String)


21
22
23
# File 'lib/daytona/volume.rb', line 21

def updated_at
  @updated_at
end