class Vellum::RawPromptExecutionOverridesRequest

def self.from_json(json_object:)

Returns:
  • (RawPromptExecutionOverridesRequest) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  JSON.parse(json_object)
  body = struct.body
  headers = struct.headers
  url = struct.url
  new(body: body, headers: headers, url: url, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.body&.is_a?(Hash) != false || raise("Passed value for field obj.body is not the expected type, validation failed.")
  obj.headers&.is_a?(Hash) != false || raise("Passed value for field obj.headers is not the expected type, validation failed.")
  obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
end

def initialize(body: nil, headers: nil, url: nil, additional_properties: nil)

Returns:
  • (RawPromptExecutionOverridesRequest) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • url (String) -- The raw URL to send to the model host.
  • headers (Hash{String => String}) -- The raw headers to send to the model host.
  • body (Hash{String => String}) --
def initialize(body: nil, headers: nil, url: nil, additional_properties: nil)
  # @type [Hash{String => String}]
  @body = body
  # @type [Hash{String => String}] The raw headers to send to the model host.
  @headers = headers
  # @type [String] The raw URL to send to the model host.
  @url = url
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

def to_json(*_args)

Returns:
  • (JSON) -
def to_json(*_args)
  { "body": @body, "headers": @headers, "url": @url }.to_json
end