Class: OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_input_item.rb,
sig/openai/models/responses/response_input_item.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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 ⇒ Object

Parameters:

  • approval_request_id —

    The ID of the approval request being answered.

  • approve —

    Whether the request was approved.

  • id —

    The unique ID of the approval response

  • reason —

    Optional reason for the decision.

  • type —

    The type of the item. Always mcp_approval_response.



1672
# File 'sig/openai/models/responses/response_input_item.rbs', line 1672

def initialize: (

Instance Attribute Details

#approval_request_id ⇒ String

The ID of the approval request being answered.

Returns:

  • (String)


1913
# File 'lib/openai/models/responses/response_input_item.rb', line 1913

required :approval_request_id, String

#approve ⇒ Boolean

Whether the request was approved.

Returns:



1919
# File 'lib/openai/models/responses/response_input_item.rb', line 1919

required :approve, OpenAI::Internal::Type::Boolean

#id ⇒ String?

The unique ID of the approval response

Returns:

  • (String, nil)


1931
# File 'lib/openai/models/responses/response_input_item.rb', line 1931

optional :id, String, nil?: true

#reason ⇒ String?

Optional reason for the decision.

Returns:

  • (String, nil)


1937
# File 'lib/openai/models/responses/response_input_item.rb', line 1937

optional :reason, String, nil?: true

#type ⇒ :mcp_approval_response

The type of the item. Always mcp_approval_response.

Returns:

  • (:mcp_approval_response)


1925
# File 'lib/openai/models/responses/response_input_item.rb', line 1925

required :type, const: :mcp_approval_response

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


1680
# File 'sig/openai/models/responses/response_input_item.rbs', line 1680

def to_hash: -> {