Package com.azure.ai.openai.models
Class Batch
java.lang.Object
com.azure.ai.openai.models.Batch
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Batch>
The Batch object.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BatchfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Batch from the JsonReader.Get the cancelledAt property: The Unix timestamp (in seconds) for when the batch was cancelled.Get the cancellingAt property: The Unix timestamp (in seconds) for when the batch started cancelling.Get the completedAt property: The Unix timestamp (in seconds) for when the batch was completed.Get the completionWindow property: The time frame within which the batch should be processed.Get the createdAt property: The Unix timestamp (in seconds) for when the batch was created.Get the endpoint property: The OpenAI API endpoint used by the batch.Get the errorFileId property: The ID of the file containing the outputs of requests with errors.Get the errors property: The list of Batch errors.Get the expiredAt property: The Unix timestamp (in seconds) for when the batch expired.Get the expiresAt property: The Unix timestamp (in seconds) for when the batch will expire.Get the failedAt property: The Unix timestamp (in seconds) for when the batch failed.Get the finalizingAt property: The Unix timestamp (in seconds) for when the batch started finalizing.getId()Get the id property: The id assigned to the Batch.Get the inProgressAt property: The Unix timestamp (in seconds) for when the batch started processing.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.Get the object property: The object type, which is always `batch`.Get the outputFileId property: The ID of the file containing the outputs of successfully executed requests.Get the requestCounts property: The request counts for different statuses within the batch.Get the status property: The current status of 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
-
Method Details
-
getId
Get the id property: The id assigned to the Batch.- Returns:
- the id value.
-
getObject
Get the object property: The object type, which is always `batch`.- Returns:
- the object value.
-
getEndpoint
Get the endpoint property: The OpenAI API endpoint used by the batch.- Returns:
- the endpoint value.
-
getErrors
Get the errors property: The list of Batch errors.- Returns:
- the errors 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.
-
getStatus
Get the status property: The current status of the batch.- Returns:
- the status value.
-
getOutputFileId
Get the outputFileId property: The ID of the file containing the outputs of successfully executed requests.- Returns:
- the outputFileId value.
-
getErrorFileId
Get the errorFileId property: The ID of the file containing the outputs of requests with errors.- Returns:
- the errorFileId value.
-
getCreatedAt
Get the createdAt property: The Unix timestamp (in seconds) for when the batch was created.- Returns:
- the createdAt value.
-
getInProgressAt
Get the inProgressAt property: The Unix timestamp (in seconds) for when the batch started processing.- Returns:
- the inProgressAt value.
-
getExpiresAt
Get the expiresAt property: The Unix timestamp (in seconds) for when the batch will expire.- Returns:
- the expiresAt value.
-
getFinalizingAt
Get the finalizingAt property: The Unix timestamp (in seconds) for when the batch started finalizing.- Returns:
- the finalizingAt value.
-
getCompletedAt
Get the completedAt property: The Unix timestamp (in seconds) for when the batch was completed.- Returns:
- the completedAt value.
-
getFailedAt
Get the failedAt property: The Unix timestamp (in seconds) for when the batch failed.- Returns:
- the failedAt value.
-
getExpiredAt
Get the expiredAt property: The Unix timestamp (in seconds) for when the batch expired.- Returns:
- the expiredAt value.
-
getCancellingAt
Get the cancellingAt property: The Unix timestamp (in seconds) for when the batch started cancelling.- Returns:
- the cancellingAt value.
-
getCancelledAt
Get the cancelledAt property: The Unix timestamp (in seconds) for when the batch was cancelled.- Returns:
- the cancelledAt value.
-
getRequestCounts
Get the requestCounts property: The request counts for different statuses within the batch.- Returns:
- the requestCounts 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.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Batch>- Throws:
IOException
-
fromJson
Reads an instance of Batch from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Batch 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 Batch.
-