Class: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::CreateFile

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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 ⇒ CreateFile

Returns a new instance of CreateFile.

Parameters:

  • diff —

    Unified diff content to apply when creating the file.

  • path —

    Path of the file to create relative to the workspace root.

  • type —

    The operation type. Always create_file.

  • diff: (String)
  • path: (String)
  • type: (:create_file)


1412
1413
1414
1415
1416
# File 'sig/openai/models/responses/response_input_item.rbs', line 1412

def initialize: (
  diff: String,
  path: String,
  ?type: :create_file
) -> void

Instance Attribute Details

#diff ⇒ String

Unified diff content to apply when creating the file.

Returns:

  • (String)


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

required :diff, String

#path ⇒ String

Path of the file to create relative to the workspace root.

Returns:

  • (String)


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

required :path, String

#type ⇒ :create_file

The operation type. Always create_file.

Returns:

  • (:create_file)


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

required :type, const: :create_file

Instance Method Details

#to_hash ⇒ { diff: String, path: String, ?type: :create_file }

Returns:

  • ({ diff: String, path: String, ?type: :create_file })


1418
1419
1420
1421
1422
# File 'sig/openai/models/responses/response_input_item.rbs', line 1418

def to_hash: -> {
  diff: String,
  path: String,
  ?type: :create_file
}