Class OpenApiFunctionDefinition
java.lang.Object
com.azure.ai.agents.persistent.models.OpenApiFunctionDefinition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<OpenApiFunctionDefinition>
public final class OpenApiFunctionDefinition
extends Object
implements com.azure.json.JsonSerializable<OpenApiFunctionDefinition>
The input definition information for an openapi function.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenApiFunctionDefinition(String name, com.azure.core.util.BinaryData spec, OpenApiAuthDetails auth) Creates an instance of OpenApiFunctionDefinition class. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenApiFunctionDefinitionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of OpenApiFunctionDefinition from the JsonReader.getAuth()Get the auth property: Open API authentication details.Get the defaultParams property: List of OpenAPI spec parameters that will use user-provided defaults.Get the description property: A description of what the function does, used by the model to choose when and how to call the function.Get the functions property: List of function definitions used by OpenApi tool.getName()Get the name property: The name of the function to be called.com.azure.core.util.BinaryDatagetSpec()Get the spec property: The openapi function shape, described as a JSON Schema object.setDefaultParams(List<String> defaultParams) Set the defaultParams property: List of OpenAPI spec parameters that will use user-provided defaults.setDescription(String description) Set the description property: A description of what the function does, used by the model to choose when and how to call the function.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
OpenApiFunctionDefinition
public OpenApiFunctionDefinition(String name, com.azure.core.util.BinaryData spec, OpenApiAuthDetails auth) Creates an instance of OpenApiFunctionDefinition class.- Parameters:
name- the name value to set.spec- the spec value to set.auth- the auth value to set.
-
-
Method Details
-
getName
Get the name property: The name of the function to be called.- Returns:
- the name value.
-
getDescription
Get the description property: A description of what the function does, used by the model to choose when and how to call the function.- Returns:
- the description value.
-
setDescription
Set the description property: A description of what the function does, used by the model to choose when and how to call the function.- Parameters:
description- the description value to set.- Returns:
- the OpenApiFunctionDefinition object itself.
-
getSpec
public com.azure.core.util.BinaryData getSpec()Get the spec property: The openapi function shape, described as a JSON Schema object.- Returns:
- the spec value.
-
getAuth
Get the auth property: Open API authentication details.- Returns:
- the auth value.
-
getDefaultParams
Get the defaultParams property: List of OpenAPI spec parameters that will use user-provided defaults.- Returns:
- the defaultParams value.
-
setDefaultParams
Set the defaultParams property: List of OpenAPI spec parameters that will use user-provided defaults.- Parameters:
defaultParams- the defaultParams value to set.- Returns:
- the OpenApiFunctionDefinition object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<OpenApiFunctionDefinition>- Throws:
IOException
-
fromJson
public static OpenApiFunctionDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of OpenApiFunctionDefinition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of OpenApiFunctionDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the OpenApiFunctionDefinition.
-
getFunctions
Get the functions property: List of function definitions used by OpenApi tool.- Returns:
- the functions value.
-