Class UserFacingError
java.lang.Object
com.azure.resourcemanager.dataprotection.models.UserFacingError
Error object used by layers that have access to localized content, and propagate that to user.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncode()
Get the code property: Unique code for this error.details()
Get the details property: Additional related Errors.Get the innerError property: InnerErrorGet the isRetryable property: Whether the operation will be retryable or not.Get the isUserError property: Whether the operation is due to a user error or service error.message()
Get the message property: The message property.Get the properties property: Any key value pairs that can be injected inside error object.Get the recommendedAction property: RecommendedAction � localized.target()
Get the target property: Target of the error.void
validate()
Validates the instance.Set the code property: Unique code for this error.withDetails
(List<UserFacingError> details) Set the details property: Additional related Errors.withInnerError
(InnerError innerError) Set the innerError property: InnerErrorwithIsRetryable
(Boolean isRetryable) Set the isRetryable property: Whether the operation will be retryable or not.withIsUserError
(Boolean isUserError) Set the isUserError property: Whether the operation is due to a user error or service error.withMessage
(String message) Set the message property: The message property.withProperties
(Map<String, String> properties) Set the properties property: Any key value pairs that can be injected inside error object.withRecommendedAction
(List<String> recommendedAction) Set the recommendedAction property: RecommendedAction � localized.withTarget
(String target) Set the target property: Target of the error.
-
Constructor Details
-
UserFacingError
public UserFacingError()Creates an instance of UserFacingError class.
-
-
Method Details
-
code
Get the code property: Unique code for this error.- Returns:
- the code value.
-
withCode
Set the code property: Unique code for this error.- Parameters:
code
- the code value to set.- Returns:
- the UserFacingError object itself.
-
details
Get the details property: Additional related Errors.- Returns:
- the details value.
-
withDetails
Set the details property: Additional related Errors.- Parameters:
details
- the details value to set.- Returns:
- the UserFacingError object itself.
-
innerError
Get the innerError property: InnerErrorInner Error.
- Returns:
- the innerError value.
-
withInnerError
Set the innerError property: InnerErrorInner Error.
- Parameters:
innerError
- the innerError value to set.- Returns:
- the UserFacingError object itself.
-
isRetryable
Get the isRetryable property: Whether the operation will be retryable or not.- Returns:
- the isRetryable value.
-
withIsRetryable
Set the isRetryable property: Whether the operation will be retryable or not.- Parameters:
isRetryable
- the isRetryable value to set.- Returns:
- the UserFacingError object itself.
-
isUserError
Get the isUserError property: Whether the operation is due to a user error or service error.- Returns:
- the isUserError value.
-
withIsUserError
Set the isUserError property: Whether the operation is due to a user error or service error.- Parameters:
isUserError
- the isUserError value to set.- Returns:
- the UserFacingError object itself.
-
properties
Get the properties property: Any key value pairs that can be injected inside error object.- Returns:
- the properties value.
-
withProperties
Set the properties property: Any key value pairs that can be injected inside error object.- Parameters:
properties
- the properties value to set.- Returns:
- the UserFacingError object itself.
-
message
Get the message property: The message property.- Returns:
- the message value.
-
withMessage
Set the message property: The message property.- Parameters:
message
- the message value to set.- Returns:
- the UserFacingError object itself.
-
recommendedAction
Get the recommendedAction property: RecommendedAction � localized.- Returns:
- the recommendedAction value.
-
withRecommendedAction
Set the recommendedAction property: RecommendedAction � localized.- Parameters:
recommendedAction
- the recommendedAction value to set.- Returns:
- the UserFacingError object itself.
-
target
Get the target property: Target of the error.- Returns:
- the target value.
-
withTarget
Set the target property: Target of the error.- Parameters:
target
- the target value to set.- Returns:
- the UserFacingError object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-