Class Batch.Builder
-
- All Implemented Interfaces:
public final class Batch.Builder
A builder for Batch.
-
-
Method Summary
Modifier and Type Method Description final Batch.Builder
id(String id)
final Batch.Builder
id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value. final Batch.Builder
completionWindow(String completionWindow)
The time frame within which the batch should be processed. final Batch.Builder
completionWindow(JsonField<String> completionWindow)
Sets Builder.completionWindow to an arbitrary JSON value. final Batch.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the batch was created. final Batch.Builder
createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value. final Batch.Builder
endpoint(String endpoint)
The OpenAI API endpoint used by the batch. final Batch.Builder
endpoint(JsonField<String> endpoint)
Sets Builder.endpoint to an arbitrary JSON value. final Batch.Builder
inputFileId(String inputFileId)
The ID of the input file for the batch. final Batch.Builder
inputFileId(JsonField<String> inputFileId)
Sets Builder.inputFileId to an arbitrary JSON value. final Batch.Builder
object_(JsonValue object_)
Sets the field to an arbitrary JSON value. final Batch.Builder
status(Batch.Status status)
The current status of the batch. final Batch.Builder
status(JsonField<Batch.Status> status)
Sets Builder.status to an arbitrary JSON value. final Batch.Builder
cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the batch was cancelled. final Batch.Builder
cancelledAt(JsonField<Long> cancelledAt)
Sets Builder.cancelledAt to an arbitrary JSON value. final Batch.Builder
cancellingAt(Long cancellingAt)
The Unix timestamp (in seconds) for when the batch started cancelling. final Batch.Builder
cancellingAt(JsonField<Long> cancellingAt)
Sets Builder.cancellingAt to an arbitrary JSON value. final Batch.Builder
completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the batch was completed. final Batch.Builder
completedAt(JsonField<Long> completedAt)
Sets Builder.completedAt to an arbitrary JSON value. final Batch.Builder
errorFileId(String errorFileId)
The ID of the file containing the outputs of requests with errors. final Batch.Builder
errorFileId(JsonField<String> errorFileId)
Sets Builder.errorFileId to an arbitrary JSON value. final Batch.Builder
errors(Batch.Errors errors)
final Batch.Builder
errors(JsonField<Batch.Errors> errors)
Sets Builder.errors to an arbitrary JSON value. final Batch.Builder
expiredAt(Long expiredAt)
The Unix timestamp (in seconds) for when the batch expired. final Batch.Builder
expiredAt(JsonField<Long> expiredAt)
Sets Builder.expiredAt to an arbitrary JSON value. final Batch.Builder
expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the batch will expire. final Batch.Builder
expiresAt(JsonField<Long> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value. final Batch.Builder
failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the batch failed. final Batch.Builder
failedAt(JsonField<Long> failedAt)
Sets Builder.failedAt to an arbitrary JSON value. final Batch.Builder
finalizingAt(Long finalizingAt)
The Unix timestamp (in seconds) for when the batch started finalizing. final Batch.Builder
finalizingAt(JsonField<Long> finalizingAt)
Sets Builder.finalizingAt to an arbitrary JSON value. final Batch.Builder
inProgressAt(Long inProgressAt)
The Unix timestamp (in seconds) for when the batch started processing. final Batch.Builder
inProgressAt(JsonField<Long> inProgressAt)
Sets Builder.inProgressAt to an arbitrary JSON value. final Batch.Builder
metadata(Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. final Batch.Builder
metadata(Optional<Metadata> metadata)
Alias for calling Builder.metadata with metadata.orElse(null)
.final Batch.Builder
metadata(JsonField<Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value. final Batch.Builder
outputFileId(String outputFileId)
The ID of the file containing the outputs of successfully executed requests. final Batch.Builder
outputFileId(JsonField<String> outputFileId)
Sets Builder.outputFileId to an arbitrary JSON value. final Batch.Builder
requestCounts(BatchRequestCounts requestCounts)
The request counts for different statuses within the batch. final Batch.Builder
requestCounts(JsonField<BatchRequestCounts> requestCounts)
Sets Builder.requestCounts to an arbitrary JSON value. final Batch.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final Batch.Builder
putAdditionalProperty(String key, JsonValue value)
final Batch.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final Batch.Builder
removeAdditionalProperty(String key)
final Batch.Builder
removeAllAdditionalProperties(Set<String> keys)
final Batch
build()
Returns an immutable instance of Batch. -
-
Method Detail
-
id
final Batch.Builder id(String id)
-
id
final Batch.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
completionWindow
final Batch.Builder completionWindow(String completionWindow)
The time frame within which the batch should be processed.
-
completionWindow
final Batch.Builder completionWindow(JsonField<String> completionWindow)
Sets Builder.completionWindow to an arbitrary JSON value.
You should usually call Builder.completionWindow with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final Batch.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the batch was created.
-
createdAt
final Batch.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
endpoint
final Batch.Builder endpoint(String endpoint)
The OpenAI API endpoint used by the batch.
-
endpoint
final Batch.Builder endpoint(JsonField<String> endpoint)
Sets Builder.endpoint to an arbitrary JSON value.
You should usually call Builder.endpoint with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputFileId
final Batch.Builder inputFileId(String inputFileId)
The ID of the input file for the batch.
-
inputFileId
final Batch.Builder inputFileId(JsonField<String> inputFileId)
Sets Builder.inputFileId to an arbitrary JSON value.
You should usually call Builder.inputFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final Batch.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("batch")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final Batch.Builder status(Batch.Status status)
The current status of the batch.
-
status
final Batch.Builder status(JsonField<Batch.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cancelledAt
final Batch.Builder cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the batch was cancelled.
-
cancelledAt
final Batch.Builder cancelledAt(JsonField<Long> cancelledAt)
Sets Builder.cancelledAt to an arbitrary JSON value.
You should usually call Builder.cancelledAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cancellingAt
final Batch.Builder cancellingAt(Long cancellingAt)
The Unix timestamp (in seconds) for when the batch started cancelling.
-
cancellingAt
final Batch.Builder cancellingAt(JsonField<Long> cancellingAt)
Sets Builder.cancellingAt to an arbitrary JSON value.
You should usually call Builder.cancellingAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
completedAt
final Batch.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the batch was completed.
-
completedAt
final Batch.Builder completedAt(JsonField<Long> completedAt)
Sets Builder.completedAt to an arbitrary JSON value.
You should usually call Builder.completedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
errorFileId
final Batch.Builder errorFileId(String errorFileId)
The ID of the file containing the outputs of requests with errors.
-
errorFileId
final Batch.Builder errorFileId(JsonField<String> errorFileId)
Sets Builder.errorFileId to an arbitrary JSON value.
You should usually call Builder.errorFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
errors
final Batch.Builder errors(Batch.Errors errors)
-
errors
final Batch.Builder errors(JsonField<Batch.Errors> errors)
Sets Builder.errors to an arbitrary JSON value.
You should usually call Builder.errors with a well-typed Errors value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiredAt
final Batch.Builder expiredAt(Long expiredAt)
The Unix timestamp (in seconds) for when the batch expired.
-
expiredAt
final Batch.Builder expiredAt(JsonField<Long> expiredAt)
Sets Builder.expiredAt to an arbitrary JSON value.
You should usually call Builder.expiredAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiresAt
final Batch.Builder expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the batch will expire.
-
expiresAt
final Batch.Builder expiresAt(JsonField<Long> expiresAt)
Sets Builder.expiresAt to an arbitrary JSON value.
You should usually call Builder.expiresAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
failedAt
final Batch.Builder failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the batch failed.
-
failedAt
final Batch.Builder failedAt(JsonField<Long> failedAt)
Sets Builder.failedAt to an arbitrary JSON value.
You should usually call Builder.failedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
finalizingAt
final Batch.Builder finalizingAt(Long finalizingAt)
The Unix timestamp (in seconds) for when the batch started finalizing.
-
finalizingAt
final Batch.Builder finalizingAt(JsonField<Long> finalizingAt)
Sets Builder.finalizingAt to an arbitrary JSON value.
You should usually call Builder.finalizingAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inProgressAt
final Batch.Builder inProgressAt(Long inProgressAt)
The Unix timestamp (in seconds) for when the batch started processing.
-
inProgressAt
final Batch.Builder inProgressAt(JsonField<Long> inProgressAt)
Sets Builder.inProgressAt to an arbitrary JSON value.
You should usually call Builder.inProgressAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
metadata
final Batch.Builder metadata(Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final Batch.Builder metadata(Optional<Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final Batch.Builder metadata(JsonField<Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputFileId
final Batch.Builder outputFileId(String outputFileId)
The ID of the file containing the outputs of successfully executed requests.
-
outputFileId
final Batch.Builder outputFileId(JsonField<String> outputFileId)
Sets Builder.outputFileId to an arbitrary JSON value.
You should usually call Builder.outputFileId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
requestCounts
final Batch.Builder requestCounts(BatchRequestCounts requestCounts)
The request counts for different statuses within the batch.
-
requestCounts
final Batch.Builder requestCounts(JsonField<BatchRequestCounts> requestCounts)
Sets Builder.requestCounts to an arbitrary JSON value.
You should usually call Builder.requestCounts with a well-typed BatchRequestCounts value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Batch.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Batch.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Batch.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Batch.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Batch.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-