Package com.sap.ai.sdk.grounding.model
Class ApiError
java.lang.Object
com.sap.ai.sdk.grounding.model.ApiError
ApiError
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDetailsItem(DetailsErrorResponse detailsItem) Add one details instance to thisApiError.Set the code of thisApiErrorinstance and return the same instance.static ApiError.Buildercreate()Create a type-safe, fluent-api builder object to construct a newApiErrorinstance with all required arguments.details(List<DetailsErrorResponse> details) Set the details of thisApiErrorinstance and return the same instance.booleangetCode()Descriptive error code (not http status code).getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theApiError.Get detailsplaintext error descriptionid of individual requesturl that has been calledinthashCode()Set the message of thisApiErrorinstance and return the same instance.Set the requestId of thisApiErrorinstance and return the same instance.voidSet the code of thisApiErrorinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisApiErrorinstance.voidsetDetails(List<DetailsErrorResponse> details) Set the details of thisApiErrorinstance.voidsetMessage(String message) Set the message of thisApiErrorinstance.voidsetRequestId(String requestId) Set the requestId of thisApiErrorinstance.voidSet the target of thisApiErrorinstance.Set the target of thisApiErrorinstance and return the same instance.toMap()Get the value of all properties of thisApiErrorinstance including unrecognized properties.toString()
-
Constructor Details
-
ApiError
protected ApiError()Default constructor for ApiError.
-
-
Method Details
-
code
Set the code of thisApiErrorinstance and return the same instance.- Parameters:
code- Descriptive error code (not http status code).- Returns:
- The same instance of this
ApiErrorclass
-
getCode
Descriptive error code (not http status code).- Returns:
- code The code of this
ApiErrorinstance.
-
setCode
Set the code of thisApiErrorinstance.- Parameters:
code- Descriptive error code (not http status code).
-
message
Set the message of thisApiErrorinstance and return the same instance.- Parameters:
message- plaintext error description- Returns:
- The same instance of this
ApiErrorclass
-
getMessage
plaintext error description- Returns:
- message The message of this
ApiErrorinstance.
-
setMessage
Set the message of thisApiErrorinstance.- Parameters:
message- plaintext error description
-
requestId
Set the requestId of thisApiErrorinstance and return the same instance.- Parameters:
requestId- id of individual request- Returns:
- The same instance of this
ApiErrorclass
-
getRequestId
id of individual request- Returns:
- requestId The requestId of this
ApiErrorinstance.
-
setRequestId
Set the requestId of thisApiErrorinstance.- Parameters:
requestId- id of individual request
-
target
Set the target of thisApiErrorinstance and return the same instance.- Parameters:
target- url that has been called- Returns:
- The same instance of this
ApiErrorclass
-
getTarget
url that has been called- Returns:
- target The target of this
ApiErrorinstance.
-
setTarget
Set the target of thisApiErrorinstance.- Parameters:
target- url that has been called
-
details
Set the details of thisApiErrorinstance and return the same instance. -
addDetailsItem
Add one details instance to thisApiError.- Parameters:
detailsItem- The details that should be added- Returns:
- The same instance of type
ApiError
-
getDetails
Get details- Returns:
- details The details of this
ApiErrorinstance.
-
setDetails
Set the details of thisApiErrorinstance.- Parameters:
details- The details of thisApiError
-
getCustomFieldNames
Get the names of the unrecognizable properties of theApiError.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisApiErrorinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisApiErrorinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisApiErrorinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newApiErrorinstance with all required arguments.
-
toMap()instead.