UserFacingError Class

  • java.lang.Object
    • com.azure.resourcemanager.dataprotection.models.UserFacingError

Implements

public final class UserFacingError
implements JsonSerializable<UserFacingError>

Error object used by layers that have access to localized content, and propagate that to user.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: Unique code for this error.

List<UserFacingError> details()

Get the details property: Additional related Errors.

static UserFacingError fromJson(JsonReader jsonReader)

Reads an instance of UserFacingError from the JsonReader.

InnerError innerError()

Get the innerError property: Inner Error.

Boolean isRetryable()

Get the isRetryable property: Whether the operation will be retryable or not.

Boolean isUserError()

Get the isUserError property: Whether the operation is due to a user error or service error.

String message()

Get the message property: The message property.

Map<String,String> properties()

Get the properties property: Any key value pairs that can be injected inside error object.

List<String> recommendedAction()

Get the recommendedAction property: RecommendedAction � localized.

String target()

Get the target property: Target of the error.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

code

public String code()

Get the code property: Unique code for this error.

Returns:

the code value.

details

public List<UserFacingError> details()

Get the details property: Additional related Errors.

Returns:

the details value.

fromJson

public static UserFacingError fromJson(JsonReader jsonReader)

Reads an instance of UserFacingError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of UserFacingError if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the UserFacingError.

innerError

public InnerError innerError()

Get the innerError property: Inner Error.

Returns:

the innerError value.

isRetryable

public Boolean isRetryable()

Get the isRetryable property: Whether the operation will be retryable or not.

Returns:

the isRetryable value.

isUserError

public Boolean isUserError()

Get the isUserError property: Whether the operation is due to a user error or service error.

Returns:

the isUserError value.

message

public String message()

Get the message property: The message property.

Returns:

the message value.

properties

public Map<String,String> properties()

Get the properties property: Any key value pairs that can be injected inside error object.

Returns:

the properties value.

recommendedAction

public List<String> recommendedAction()

Get the recommendedAction property: RecommendedAction � localized.

Returns:

the recommendedAction value.

target

public String target()

Get the target property: Target of the error.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to