Class AgentResponsesAuthErrorBuilder
- All Implemented Interfaces:
Builder<AgentResponsesAuthError>
Example to create an instance using the builder pattern
AgentResponsesAuthError agentResponsesAuthError = AgentResponsesAuthError.builder()
.statusCode(1)
.message("{message}")
.plusErrors(errorsBuilder -> errorsBuilder)
.error("{error}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds AgentResponsesAuthError with checking for non-null required valuesbuilds AgentResponsesAuthError without checking for non-null required valuesError code as per the OAuth 2.0 specification.error_description(String error_description) Plain text description of the first error.errors(ErrorObject... errors) Authentication and authorization-related errors returned for a request.errors(List<ErrorObject> errors) Authentication and authorization-related errors returned for a request.getError()Error code as per the OAuth 2.0 specification.Plain text description of the first error.Authentication and authorization-related errors returned for a request.First error message in theerrorsarray.HTTP status code corresponding to the error.First error message in theerrorsarray.of()factory method for an instance of AgentResponsesAuthErrorBuilderof(AgentResponsesAuthError template) create builder for AgentResponsesAuthError instanceplusErrors(ErrorObject... errors) Authentication and authorization-related errors returned for a request.plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.statusCode(Integer statusCode) HTTP status code corresponding to the error.withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
-
Constructor Details
-
AgentResponsesAuthErrorBuilder
public AgentResponsesAuthErrorBuilder()
-
-
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
Authentication and authorization-related errors returned for a request.
- Parameters:
errors- value to be set- Returns:
- Builder
-
errors
Authentication and authorization-related errors returned for a request.
- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
Authentication and authorization-related errors returned for a request.
- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
public AgentResponsesAuthErrorBuilder plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
withErrors
public AgentResponsesAuthErrorBuilder withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
error
Error code as per the OAuth 2.0 specification. For example:
"access_denied".- Parameters:
error- value to be set- Returns:
- Builder
-
error_description
Plain text description of the first error.
- Parameters:
error_description- 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
Authentication and authorization-related errors returned for a request.
- Returns:
- errors
-
getError
Error code as per the OAuth 2.0 specification. For example:
"access_denied".- Returns:
- error
-
getError_description
Plain text description of the first error.
- Returns:
- error_description
-
build
builds AgentResponsesAuthError with checking for non-null required values- Specified by:
buildin interfaceBuilder<AgentResponsesAuthError>- Returns:
- AgentResponsesAuthError
-
buildUnchecked
builds AgentResponsesAuthError without checking for non-null required values- Returns:
- AgentResponsesAuthError
-
of
factory method for an instance of AgentResponsesAuthErrorBuilder- Returns:
- builder
-
of
create builder for AgentResponsesAuthError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-