Error Class

  • java.lang.Object
    • com.azure.resourcemanager.springappdiscovery.models.Error

Implements

public final class Error
implements JsonSerializable<Error>

Defines the error.

Constructor Summary

Constructor Description
Error()

Creates an instance of Error class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: The error code.

static Error fromJson(JsonReader jsonReader)

Reads an instance of Error from the JsonReader.

Long id()

Get the id property: The error ID.

String message()

Get the message property: The detailed error message.

String possibleCauses()

Get the possibleCauses property: The error possible causes.

String recommendedAction()

Get the recommendedAction property: The error recommended action.

String runAsAccountId()

Get the runAsAccountId property: The account ID used to login.

String severity()

Get the severity property: The error severity.

String summaryMessage()

Get the summaryMessage property: The summarized error message.

JsonWriter toJson(JsonWriter jsonWriter)
OffsetDateTime updatedTimestamp()

Get the updatedTimestamp property: Time when this error was last updated.

void validate()

Validates the instance.

Error withCode(String code)

Set the code property: The error code.

Error withId(Long id)

Set the id property: The error ID.

Error withMessage(String message)

Set the message property: The detailed error message.

Error withPossibleCauses(String possibleCauses)

Set the possibleCauses property: The error possible causes.

Error withRecommendedAction(String recommendedAction)

Set the recommendedAction property: The error recommended action.

Error withRunAsAccountId(String runAsAccountId)

Set the runAsAccountId property: The account ID used to login.

Error withSeverity(String severity)

Set the severity property: The error severity.

Error withSummaryMessage(String summaryMessage)

Set the summaryMessage property: The summarized error message.

Error withUpdatedTimestamp(OffsetDateTime updatedTimestamp)

Set the updatedTimestamp property: Time when this error was last updated.

Methods inherited from java.lang.Object

Constructor Details

Error

public Error()

Creates an instance of Error class.

Method Details

code

public String code()

Get the code property: The error code.

Returns:

the code value.

fromJson

public static Error fromJson(JsonReader jsonReader)

Reads an instance of Error from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Error 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 Error.

id

public Long id()

Get the id property: The error ID.

Returns:

the id value.

message

public String message()

Get the message property: The detailed error message.

Returns:

the message value.

possibleCauses

public String possibleCauses()

Get the possibleCauses property: The error possible causes.

Returns:

the possibleCauses value.

recommendedAction

public String recommendedAction()

Get the recommendedAction property: The error recommended action.

Returns:

the recommendedAction value.

runAsAccountId

public String runAsAccountId()

Get the runAsAccountId property: The account ID used to login.

Returns:

the runAsAccountId value.

severity

public String severity()

Get the severity property: The error severity.

Returns:

the severity value.

summaryMessage

public String summaryMessage()

Get the summaryMessage property: The summarized error message.

Returns:

the summaryMessage value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

updatedTimestamp

public OffsetDateTime updatedTimestamp()

Get the updatedTimestamp property: Time when this error was last updated.

Returns:

the updatedTimestamp value.

validate

public void validate()

Validates the instance.

withCode

public Error withCode(String code)

Set the code property: The error code.

Parameters:

code - the code value to set.

Returns:

the Error object itself.

withId

public Error withId(Long id)

Set the id property: The error ID.

Parameters:

id - the id value to set.

Returns:

the Error object itself.

withMessage

public Error withMessage(String message)

Set the message property: The detailed error message.

Parameters:

message - the message value to set.

Returns:

the Error object itself.

withPossibleCauses

public Error withPossibleCauses(String possibleCauses)

Set the possibleCauses property: The error possible causes.

Parameters:

possibleCauses - the possibleCauses value to set.

Returns:

the Error object itself.

withRecommendedAction

public Error withRecommendedAction(String recommendedAction)

Set the recommendedAction property: The error recommended action.

Parameters:

recommendedAction - the recommendedAction value to set.

Returns:

the Error object itself.

withRunAsAccountId

public Error withRunAsAccountId(String runAsAccountId)

Set the runAsAccountId property: The account ID used to login.

Parameters:

runAsAccountId - the runAsAccountId value to set.

Returns:

the Error object itself.

withSeverity

public Error withSeverity(String severity)

Set the severity property: The error severity.

Parameters:

severity - the severity value to set.

Returns:

the Error object itself.

withSummaryMessage

public Error withSummaryMessage(String summaryMessage)

Set the summaryMessage property: The summarized error message.

Parameters:

summaryMessage - the summaryMessage value to set.

Returns:

the Error object itself.

withUpdatedTimestamp

public Error withUpdatedTimestamp(OffsetDateTime updatedTimestamp)

Set the updatedTimestamp property: Time when this error was last updated.

Parameters:

updatedTimestamp - the updatedTimestamp value to set.

Returns:

the Error object itself.

Applies to