Class: ClaudeAgentSDK::ResultMessage
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::ResultMessage
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Result message with cost and usage information
Instance Attribute Summary collapse
-
#duration_api_ms ⇒ Object
Returns the value of attribute duration_api_ms.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#is_error ⇒ Object
Returns the value of attribute is_error.
-
#num_turns ⇒ Object
Returns the value of attribute num_turns.
-
#result ⇒ Object
Returns the value of attribute result.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#structured_output ⇒ Object
Returns the value of attribute structured_output.
-
#subtype ⇒ Object
Returns the value of attribute subtype.
-
#total_cost_usd ⇒ Object
Returns the value of attribute total_cost_usd.
-
#usage ⇒ Object
Returns the value of attribute usage.
Instance Method Summary collapse
-
#initialize(subtype:, duration_ms:, duration_api_ms:, is_error:, num_turns:, session_id:, total_cost_usd: nil, usage: nil, result: nil, structured_output: nil) ⇒ ResultMessage
constructor
A new instance of ResultMessage.
Constructor Details
#initialize(subtype:, duration_ms:, duration_api_ms:, is_error:, num_turns:, session_id:, total_cost_usd: nil, usage: nil, result: nil, structured_output: nil) ⇒ ResultMessage
Returns a new instance of ResultMessage.
121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/claude_agent_sdk/types.rb', line 121 def initialize(subtype:, duration_ms:, duration_api_ms:, is_error:, num_turns:, session_id:, total_cost_usd: nil, usage: nil, result: nil, structured_output: nil) @subtype = subtype @duration_ms = duration_ms @duration_api_ms = duration_api_ms @is_error = is_error @num_turns = num_turns @session_id = session_id @total_cost_usd = total_cost_usd @usage = usage @result = result @structured_output = structured_output # Structured output when output_format is specified end |
Instance Attribute Details
#duration_api_ms ⇒ Object
Returns the value of attribute duration_api_ms.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def duration_api_ms @duration_api_ms end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def duration_ms @duration_ms end |
#is_error ⇒ Object
Returns the value of attribute is_error.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def is_error @is_error end |
#num_turns ⇒ Object
Returns the value of attribute num_turns.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def num_turns @num_turns end |
#result ⇒ Object
Returns the value of attribute result.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def result @result end |
#session_id ⇒ Object
Returns the value of attribute session_id.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def session_id @session_id end |
#structured_output ⇒ Object
Returns the value of attribute structured_output.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def structured_output @structured_output end |
#subtype ⇒ Object
Returns the value of attribute subtype.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def subtype @subtype end |
#total_cost_usd ⇒ Object
Returns the value of attribute total_cost_usd.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def total_cost_usd @total_cost_usd end |
#usage ⇒ Object
Returns the value of attribute usage.
118 119 120 |
# File 'lib/claude_agent_sdk/types.rb', line 118 def usage @usage end |