Share via


CloudError Class

  • java.lang.Object
    • com.azure.resourcemanager.databox.models.CloudError

Implements

public final class CloudError
implements JsonSerializable<CloudError>

Provides additional information about an http error response.

Constructor Summary

Constructor Description
CloudError()

Creates an instance of CloudError class.

Method Summary

Modifier and Type Method and Description
List<AdditionalErrorInfo> additionalInfo()

Get the additionalInfo property: Gets or sets additional error info.

String code()

Get the code property: Error code.

List<CloudError> details()

Get the details property: Gets or sets details for the error.

static CloudError fromJson(JsonReader jsonReader)

Reads an instance of CloudError from the JsonReader.

String message()

Get the message property: The error message parsed from the body of the http error response.

String target()

Get the target property: Gets or sets the target of the error.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CloudError withCode(String code)

Set the code property: Error code.

CloudError withMessage(String message)

Set the message property: The error message parsed from the body of the http error response.

CloudError withTarget(String target)

Set the target property: Gets or sets the target of the error.

Methods inherited from java.lang.Object

Constructor Details

CloudError

public CloudError()

Creates an instance of CloudError class.

Method Details

additionalInfo

public List<AdditionalErrorInfo> additionalInfo()

Get the additionalInfo property: Gets or sets additional error info.

Returns:

the additionalInfo value.

code

public String code()

Get the code property: Error code.

Returns:

the code value.

details

public List<CloudError> details()

Get the details property: Gets or sets details for the error.

Returns:

the details value.

fromJson

public static CloudError fromJson(JsonReader jsonReader)

Reads an instance of CloudError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

message

public String message()

Get the message property: The error message parsed from the body of the http error response.

Returns:

the message value.

target

public String target()

Get the target property: Gets or sets the target of the error.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCode

public CloudError withCode(String code)

Set the code property: Error code.

Parameters:

code - the code value to set.

Returns:

the CloudError object itself.

withMessage

public CloudError withMessage(String message)

Set the message property: The error message parsed from the body of the http error response.

Parameters:

message - the message value to set.

Returns:

the CloudError object itself.

withTarget

public CloudError withTarget(String target)

Set the target property: Gets or sets the target of the error.

Parameters:

target - the target value to set.

Returns:

the CloudError object itself.

Applies to