Class AgentResponsesErrorResponseBuilder
- All Implemented Interfaces:
Builder<AgentResponsesErrorResponse>
Example to create an instance using the builder pattern
AgentResponsesErrorResponse agentResponsesErrorResponse = AgentResponsesErrorResponse.builder()
.statusCode(1)
.message("{message}")
.plusErrors(errorsBuilder -> errorsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds AgentResponsesErrorResponse with checking for non-null required valuesbuilds AgentResponsesErrorResponse without checking for non-null required valueserrors(ErrorObject... errors) Errors returned for a request.errors(List<ErrorObject> errors) Errors returned for a request.Errors returned for a request.First error message in theerrorsarray.HTTP status code corresponding to the error.Identifier of the workflow run that raised the error.First error message in theerrorsarray.of()factory method for an instance of AgentResponsesErrorResponseBuilderof(AgentResponsesErrorResponse template) create builder for AgentResponsesErrorResponse instanceplusErrors(ErrorObject... errors) Errors returned for a request.plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Errors returned for a request.statusCode(Integer statusCode) HTTP status code corresponding to the error.Identifier of the workflow run that raised the error.withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Errors returned for a request.
-
Constructor Details
-
AgentResponsesErrorResponseBuilder
public AgentResponsesErrorResponseBuilder()
-
-
Method Details
-
statusCode
HTTP status code corresponding to the error.
- Parameters:
statusCode- value to be set- Returns:
- Builder
-
message
First error message in the
errorsarray.- Parameters:
message- value to be set- Returns:
- Builder
-
errors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Parameters:
errors- value to be set- Returns:
- Builder
-
errors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
public AgentResponsesErrorResponseBuilder plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
withErrors
public AgentResponsesErrorResponseBuilder withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
threadId
Identifier of the workflow run that raised the error. Present on errors raised once the workflow has started. Absent on errors raised while parsing the request, before the workflow starts.
- Parameters:
threadId- value to be set- Returns:
- Builder
-
getStatusCode
HTTP status code corresponding to the error.
- Returns:
- statusCode
-
getMessage
First error message in the
errorsarray.- Returns:
- message
-
getErrors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Returns:
- errors
-
getThreadId
Identifier of the workflow run that raised the error. Present on errors raised once the workflow has started. Absent on errors raised while parsing the request, before the workflow starts.
- Returns:
- threadId
-
build
builds AgentResponsesErrorResponse with checking for non-null required values- Specified by:
buildin interfaceBuilder<AgentResponsesErrorResponse>- Returns:
- AgentResponsesErrorResponse
-
buildUnchecked
builds AgentResponsesErrorResponse without checking for non-null required values- Returns:
- AgentResponsesErrorResponse
-
of
factory method for an instance of AgentResponsesErrorResponseBuilder- Returns:
- builder
-
of
create builder for AgentResponsesErrorResponse instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-