Class: Zavudev::Models::Senders::Agent::ToolListTestRunsResponse::Item

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb,
sig/zavudev/models/senders/agent/tool_list_test_runs_response.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, duration_ms:, success:, tool_id:, error: nil, params: nil, response: nil, status_code: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::Senders::Agent::ToolListTestRunsResponse::Item for more details.

One run of a tool triggered from the test endpoint. Recorded so a test is verifiable after the fact rather than only visible in the response.

Parameters:

  • id (String)
  • created_at (Time)
  • duration_ms (Integer)
  • success (Boolean) —

    Whether the tool returned without error. A tool that answered with a non-2xx sta

  • tool_id (String)
  • error (String, nil) (defaults to: nil) —

    Why the run failed, when it did.

  • params (Hash{Symbol=>Object}) (defaults to: nil) —

    The parameters the tool was called with.

  • response (String, nil) (defaults to: nil) —

    The tool's response body, truncated.

  • status_code (Integer, nil) (defaults to: nil) —

    HTTP status the tool's webhook returned. Absent for tools that do not go over HT



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 18

class Item < Zavudev::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute created_at
  #
  #   @return [Time]
  required :created_at, Time, api_name: :createdAt

  # @!attribute duration_ms
  #
  #   @return [Integer]
  required :duration_ms, Integer, api_name: :durationMs

  # @!attribute success
  #   Whether the tool returned without error. A tool that answered with a non-2xx
  #   status is a failed run, not an error of this endpoint.
  #
  #   @return [Boolean]
  required :success, Zavudev::Internal::Type::Boolean

  # @!attribute tool_id
  #
  #   @return [String]
  required :tool_id, String, api_name: :toolId

  # @!attribute error
  #   Why the run failed, when it did.
  #
  #   @return [String, nil]
  optional :error, String, nil?: true

  # @!attribute params
  #   The parameters the tool was called with.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :params, Zavudev::Internal::Type::HashOf[Zavudev::Internal::Type::Unknown]

  # @!attribute response
  #   The tool's response body, truncated.
  #
  #   @return [String, nil]
  optional :response, String, nil?: true

  # @!attribute status_code
  #   HTTP status the tool's webhook returned. Absent for tools that do not go over
  #   HTTP.
  #
  #   @return [Integer, nil]
  optional :status_code, Integer, api_name: :statusCode, nil?: true

  # @!method initialize(id:, created_at:, duration_ms:, success:, tool_id:, error: nil, params: nil, response: nil, status_code: nil)
  #   Some parameter documentations has been truncated, see
  #   {Zavudev::Models::Senders::Agent::ToolListTestRunsResponse::Item} for more
  #   details.
  #
  #   One run of a tool triggered from the test endpoint. Recorded so a test is
  #   verifiable after the fact rather than only visible in the response.
  #
  #   @param id [String]
  #
  #   @param created_at [Time]
  #
  #   @param duration_ms [Integer]
  #
  #   @param success [Boolean] Whether the tool returned without error. A tool that answered with a non-2xx sta
  #
  #   @param tool_id [String]
  #
  #   @param error [String, nil] Why the run failed, when it did.
  #
  #   @param params [Hash{Symbol=>Object}] The parameters the tool was called with.
  #
  #   @param response [String, nil] The tool's response body, truncated.
  #
  #   @param status_code [Integer, nil] HTTP status the tool's webhook returned. Absent for tools that do not go over HT
end

Instance Attribute Details

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


27
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 27

required :created_at, Time, api_name: :createdAt

#duration_ms ⇒ Integer

Parameters:

  • value (Integer)

Returns:

  • (Integer)


32
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 32

required :duration_ms, Integer, api_name: :durationMs

#error ⇒ String?

Why the run failed, when it did.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 50

optional :error, String, nil?: true

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 22

required :id, String

#params ⇒ Hash{Symbol=>Object}?

The parameters the tool was called with.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


56
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 56

optional :params, Zavudev::Internal::Type::HashOf[Zavudev::Internal::Type::Unknown]

#response ⇒ String?

The tool's response body, truncated.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


62
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 62

optional :response, String, nil?: true

#status_code ⇒ Integer?

HTTP status the tool's webhook returned. Absent for tools that do not go over HTTP.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


69
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 69

optional :status_code, Integer, api_name: :statusCode, nil?: true

#success ⇒ Boolean

Whether the tool returned without error. A tool that answered with a non-2xx status is a failed run, not an error of this endpoint.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


39
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 39

required :success, Zavudev::Internal::Type::Boolean

#tool_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


44
# File 'lib/zavudev/models/senders/agent/tool_list_test_runs_response.rb', line 44

required :tool_id, String, api_name: :toolId

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


67
# File 'sig/zavudev/models/senders/agent/tool_list_test_runs_response.rbs', line 67

def to_hash: -> {