Class: LanggraphPlatform::Models::Cron
- Inherits:
-
Object
- Object
- LanggraphPlatform::Models::Cron
- Defined in:
- lib/langgraph_platform/models/cron.rb
Instance Attribute Summary collapse
-
#assistant_id ⇒ Object
readonly
Returns the value of attribute assistant_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#cron_id ⇒ Object
readonly
Returns the value of attribute cron_id.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#next_run_time ⇒ Object
readonly
Returns the value of attribute next_run_time.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(attributes) ⇒ Cron
constructor
A new instance of Cron.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Cron
Returns a new instance of Cron.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/langgraph_platform/models/cron.rb', line 7 def initialize(attributes) @cron_id = attributes['cron_id'] @assistant_id = attributes['assistant_id'] @thread_id = attributes['thread_id'] @schedule = attributes['schedule'] @payload = attributes['payload'] @created_at = parse_time(attributes['created_at']) @updated_at = parse_time(attributes['updated_at']) @next_run_time = parse_time(attributes['next_run_time']) @enabled = attributes['enabled'] end |
Instance Attribute Details
#assistant_id ⇒ Object (readonly)
Returns the value of attribute assistant_id.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def assistant_id @assistant_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def created_at @created_at end |
#cron_id ⇒ Object (readonly)
Returns the value of attribute cron_id.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def cron_id @cron_id end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def enabled @enabled end |
#next_run_time ⇒ Object (readonly)
Returns the value of attribute next_run_time.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def next_run_time @next_run_time end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def payload @payload end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def schedule @schedule end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def thread_id @thread_id end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/langgraph_platform/models/cron.rb', line 4 def updated_at @updated_at end |
Instance Method Details
#disabled? ⇒ Boolean
23 24 25 |
# File 'lib/langgraph_platform/models/cron.rb', line 23 def disabled? !enabled? end |
#enabled? ⇒ Boolean
19 20 21 |
# File 'lib/langgraph_platform/models/cron.rb', line 19 def enabled? @enabled == true end |
#to_h ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/langgraph_platform/models/cron.rb', line 27 def to_h { cron_id: @cron_id, assistant_id: @assistant_id, thread_id: @thread_id, schedule: @schedule, payload: @payload, created_at: @created_at, updated_at: @updated_at, next_run_time: @next_run_time, enabled: @enabled } end |
#to_json(*args) ⇒ Object
41 42 43 |
# File 'lib/langgraph_platform/models/cron.rb', line 41 def to_json(*args) to_h.to_json(*args) end |