class Vellum::FunctionCallChatMessageContentValueRequest
The final resolved function call value.
def self.from_json(json_object:)
-
(FunctionCallChatMessageContentValueRequest)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) JSON.parse(json_object) name = struct.name arguments = struct.arguments id = struct.id new(name: name, arguments: arguments, id: id, additional_properties: struct) end
def self.validate_raw(obj:)
-
(Void)-
Parameters:
-
obj(Object) --
def self.validate_raw(obj:) obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.arguments.is_a?(Hash) != false || raise("Passed value for field obj.arguments is not the expected type, validation failed.") obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") end
def initialize(name:, arguments:, id: nil, additional_properties: nil)
-
(FunctionCallChatMessageContentValueRequest)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
id(String) -- -
arguments(Hash{String => String}) -- -
name(String) --
def initialize(name:, arguments:, id: nil, additional_properties: nil) # @type [String] @name = name # @type [Hash{String => String}] @arguments = arguments # @type [String] @id = id # @type [OpenStruct] Additional properties unmapped to the current class definition @additional_properties = additional_properties end
def to_json(*_args)
-
(JSON)-
def to_json(*_args) { "name": @name, "arguments": @arguments, "id": @id }.to_json end