Class: LanggraphPlatform::Models::Checkpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/langgraph_platform/models/checkpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Checkpoint

Returns a new instance of Checkpoint.



7
8
9
10
11
12
13
14
# File 'lib/langgraph_platform/models/checkpoint.rb', line 7

def initialize(attributes)
  @checkpoint_id = attributes['checkpoint_id']
  @thread_id = attributes['thread_id']
  @checkpoint_ns = attributes['checkpoint_ns']
  @checkpoint_map = attributes['checkpoint_map']
  @parent_checkpoint_id = attributes['parent_checkpoint_id']
  @created_at = parse_time(attributes['created_at'])
end

Instance Attribute Details

#checkpoint_id ⇒ Object (readonly)

Returns the value of attribute checkpoint_id.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def checkpoint_id
  @checkpoint_id
end

#checkpoint_map ⇒ Object (readonly)

Returns the value of attribute checkpoint_map.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def checkpoint_map
  @checkpoint_map
end

#checkpoint_ns ⇒ Object (readonly)

Returns the value of attribute checkpoint_ns.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def checkpoint_ns
  @checkpoint_ns
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def created_at
  @created_at
end

#parent_checkpoint_id ⇒ Object (readonly)

Returns the value of attribute parent_checkpoint_id.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def parent_checkpoint_id
  @parent_checkpoint_id
end

#thread_id ⇒ Object (readonly)

Returns the value of attribute thread_id.



4
5
6
# File 'lib/langgraph_platform/models/checkpoint.rb', line 4

def thread_id
  @thread_id
end

Instance Method Details

#to_h ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/langgraph_platform/models/checkpoint.rb', line 16

def to_h
  {
    checkpoint_id: @checkpoint_id,
    thread_id: @thread_id,
    checkpoint_ns: @checkpoint_ns,
    checkpoint_map: @checkpoint_map,
    parent_checkpoint_id: @parent_checkpoint_id,
    created_at: @created_at
  }
end

#to_json(*args) ⇒ Object



27
28
29
# File 'lib/langgraph_platform/models/checkpoint.rb', line 27

def to_json(*args)
  to_h.to_json(*args)
end