Class: AgentCliRuntime::ObservableResult

Inherits:
Data
  • Object
show all
Defined in:
lib/agent_cli_runtime/values.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider:, launcher_identity:, exit_code:, timed_out:, status:, usage:, final_message:, diagnostic:) ⇒ ObservableResult

Returns a new instance of ObservableResult.



159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/agent_cli_runtime/values.rb', line 159

def initialize(provider:, launcher_identity:, exit_code:, timed_out:,
               status:, usage:, final_message:, diagnostic:)
  super(
    provider: provider.to_sym,
    launcher_identity: Immutable.string(launcher_identity),
    exit_code: exit_code,
    timed_out: timed_out == true,
    status: status&.to_sym,
    usage: usage&.dup&.freeze,
    final_message:
      final_message.nil? ? nil : Immutable.string(final_message),
    diagnostic: diagnostic.nil? ? nil : Immutable.string(diagnostic)
  )
end

Instance Attribute Details

#diagnosticObject (readonly)

Returns the value of attribute diagnostic

Returns:

  • (Object)

    the current value of diagnostic



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def diagnostic
  @diagnostic
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code

Returns:

  • (Object)

    the current value of exit_code



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def exit_code
  @exit_code
end

#final_messageObject (readonly)

Returns the value of attribute final_message

Returns:

  • (Object)

    the current value of final_message



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def final_message
  @final_message
end

#launcher_identityObject (readonly)

Returns the value of attribute launcher_identity

Returns:

  • (Object)

    the current value of launcher_identity



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def launcher_identity
  @launcher_identity
end

#providerObject (readonly)

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def provider
  @provider
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def status
  @status
end

#timed_outObject (readonly)

Returns the value of attribute timed_out

Returns:

  • (Object)

    the current value of timed_out



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def timed_out
  @timed_out
end

#usageObject (readonly)

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



155
156
157
# File 'lib/agent_cli_runtime/values.rb', line 155

def usage
  @usage
end