Package com.azure.ai.openai.models
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 Summary
ConstructorsConstructorDescriptionBatchCreateRequest(String endpoint, String inputFileId, String completionWindow) Creates an instance of BatchCreateRequest class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchCreateRequestfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BatchCreateRequest from the JsonReader.Get the completionWindow property: The time frame within which the batch should be processed.Get the endpoint property: The API endpoint used by the batch.Get the inputFileId property: The ID of the input file for the batch.Get the metadata property: A set of key-value pairs that can be attached to the batch.setMetadata(Map<String, String> metadata) Set the metadata property: A set of key-value pairs that can be attached to the batch.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
-
BatchCreateRequest
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
Get the endpoint property: The API endpoint used by the batch.- Returns:
- the endpoint value.
-
getInputFileId
Get the inputFileId property: The ID of the input file for the batch.- Returns:
- the inputFileId value.
-
getCompletionWindow
Get the completionWindow property: The time frame within which the batch should be processed.- Returns:
- the completionWindow value.
-
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<BatchCreateRequest>- Throws:
IOException
-
fromJson
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.
-