Class BatchCreateRequest

java.lang.Object
com.azure.ai.openai.models.BatchCreateRequest
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchCreateRequest>

public final class BatchCreateRequest extends Object implements com.azure.json.JsonSerializable<BatchCreateRequest>
Defines the request to create a batch.
  • Constructor Details

    • BatchCreateRequest

      public BatchCreateRequest(String endpoint, String inputFileId, String completionWindow)
      Creates an instance of BatchCreateRequest class.
      Parameters:
      endpoint - the endpoint value to set.
      inputFileId - the inputFileId value to set.
      completionWindow - the completionWindow value to set.
  • Method Details

    • getEndpoint

      public String getEndpoint()
      Get the endpoint property: The API endpoint used by the batch.
      Returns:
      the endpoint value.
    • getInputFileId

      public String getInputFileId()
      Get the inputFileId property: The ID of the input file for the batch.
      Returns:
      the inputFileId value.
    • getCompletionWindow

      public String getCompletionWindow()
      Get the completionWindow property: The time frame within which the batch should be processed.
      Returns:
      the completionWindow value.
    • getMetadata

      public Map<String,String> getMetadata()
      Get the metadata property: A set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.
      Returns:
      the metadata value.
    • setMetadata

      public BatchCreateRequest setMetadata(Map<String,String> metadata)
      Set the metadata property: A set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.
      Parameters:
      metadata - the metadata value to set.
      Returns:
      the BatchCreateRequest 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<BatchCreateRequest>
      Throws:
      IOException
    • fromJson

      public static BatchCreateRequest fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchCreateRequest from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchCreateRequest 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 BatchCreateRequest.