Package com.openai.errors
Class UnexpectedStatusCodeException.Builder
-
- All Implemented Interfaces:
public final class UnexpectedStatusCodeException.BuilderA builder for UnexpectedStatusCodeException.
-
-
Method Summary
Modifier and Type Method Description final UnexpectedStatusCodeException.BuilderstatusCode(Integer statusCode)final UnexpectedStatusCodeException.Builderheaders(Headers headers)final UnexpectedStatusCodeException.Buildererror(ErrorObject error)final UnexpectedStatusCodeException.Buildererror(Optional<ErrorObject> error)Alias for calling Builder.error with error.orElse(null).final UnexpectedStatusCodeException.Buildercause(Throwable cause)final UnexpectedStatusCodeException.Buildercause(Optional<Throwable> cause)Alias for calling Builder.cause with cause.orElse(null).final UnexpectedStatusCodeExceptionbuild()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()
-
-
-
-