Package com.openai.errors
Class UnexpectedStatusCodeException.Builder
-
- All Implemented Interfaces:
public final class UnexpectedStatusCodeException.Builder
A builder for UnexpectedStatusCodeException.
-
-
Method Summary
Modifier and Type Method Description final UnexpectedStatusCodeException.Builder
statusCode(Integer statusCode)
final UnexpectedStatusCodeException.Builder
headers(Headers headers)
final UnexpectedStatusCodeException.Builder
error(ErrorObject error)
final UnexpectedStatusCodeException.Builder
error(Optional<ErrorObject> error)
Alias for calling Builder.error with error.orElse(null)
.final UnexpectedStatusCodeException.Builder
cause(Throwable cause)
final UnexpectedStatusCodeException.Builder
cause(Optional<Throwable> cause)
Alias for calling Builder.cause with cause.orElse(null)
.final UnexpectedStatusCodeException
build()
Returns an immutable instance of UnexpectedStatusCodeException. -
-
Method Detail
-
statusCode
final UnexpectedStatusCodeException.Builder statusCode(Integer statusCode)
-
headers
final UnexpectedStatusCodeException.Builder headers(Headers headers)
-
error
final UnexpectedStatusCodeException.Builder error(ErrorObject error)
-
error
final UnexpectedStatusCodeException.Builder error(Optional<ErrorObject> error)
Alias for calling Builder.error with
error.orElse(null)
.
-
cause
final UnexpectedStatusCodeException.Builder cause(Throwable cause)
-
cause
final UnexpectedStatusCodeException.Builder cause(Optional<Throwable> cause)
Alias for calling Builder.cause with
cause.orElse(null)
.
-
build
final UnexpectedStatusCodeException build()
Returns an immutable instance of UnexpectedStatusCodeException.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.statusCode() .headers()
-
-
-
-