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 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

      public String getName()
      Get the name property: The name of the function to be called.
      Returns:
      the name value.
    • getDescription

      public String 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

      public OpenApiFunctionDefinition 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.
      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

      public OpenApiAuthDetails getAuth()
      Get the auth property: Open API authentication details.
      Returns:
      the auth value.
    • getDefaultParams

      public List<String> getDefaultParams()
      Get the defaultParams property: List of OpenAPI spec parameters that will use user-provided defaults.
      Returns:
      the defaultParams value.
    • setDefaultParams

      public OpenApiFunctionDefinition setDefaultParams(List<String> defaultParams)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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

      public List<FunctionDefinition> getFunctions()
      Get the functions property: List of function definitions used by OpenApi tool.
      Returns:
      the functions value.