Class: LanggraphPlatform::Models::StoreItem
- Inherits:
-
Object
- Object
- LanggraphPlatform::Models::StoreItem
- Defined in:
- lib/langgraph_platform/models/store_item.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ StoreItem
constructor
A new instance of StoreItem.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(attributes) ⇒ StoreItem
Returns a new instance of StoreItem.
6 7 8 9 10 11 12 |
# File 'lib/langgraph_platform/models/store_item.rb', line 6 def initialize(attributes) @namespace = attributes['namespace'] @key = attributes['key'] @value = attributes['value'] @created_at = parse_time(attributes['created_at']) @updated_at = parse_time(attributes['updated_at']) end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/langgraph_platform/models/store_item.rb', line 4 def created_at @created_at end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/langgraph_platform/models/store_item.rb', line 4 def key @key end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
4 5 6 |
# File 'lib/langgraph_platform/models/store_item.rb', line 4 def namespace @namespace end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/langgraph_platform/models/store_item.rb', line 4 def updated_at @updated_at end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/langgraph_platform/models/store_item.rb', line 4 def value @value end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/langgraph_platform/models/store_item.rb', line 14 def to_h { namespace: @namespace, key: @key, value: @value, created_at: @created_at, updated_at: @updated_at } end |
#to_json(*args) ⇒ Object
24 25 26 |
# File 'lib/langgraph_platform/models/store_item.rb', line 24 def to_json(*args) to_h.to_json(*args) end |