1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
1011use crate::models;
12use serde::{Deserialize, Serialize};
1314#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct OpenAiFunctionParameters {
16/// This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.
17#[serde(rename = "type")]
18pub r#type: TypeTrue,
19/// This provides a description of the properties required by the function. JSON Schema can be used to specify expectations for each property. Refer to [this doc](https://ajv.js.org/json-schema.html#json-data-type) for a comprehensive guide on JSON Schema.
20#[serde(rename = "properties")]
21pub properties: std::collections::HashMap<String, models::JsonSchema>,
22/// This specifies the properties that are required by the function.
23#[serde(rename = "required", skip_serializing_if = "Option::is_none")]
24pub required: Option<Vec<String>>,
25}
2627impl OpenAiFunctionParameters {
28pub fn new(
29 r#type: TypeTrue,
30 properties: std::collections::HashMap<String, models::JsonSchema>,
31 ) -> OpenAiFunctionParameters {
32 OpenAiFunctionParameters {
33 r#type,
34 properties,
35 required: None,
36 }
37 }
38}
39/// This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum TypeTrue {
42#[serde(rename = "object")]
43Object,
44}
4546impl Default for TypeTrue {
47fn default() -> TypeTrue {
48Self::Object
49 }
50}