共用方式為


OperationStatusError Class

  • java.lang.Object
    • com.azure.resourcemanager.baremetalinfrastructure.models.OperationStatusError

Implements

public final class OperationStatusError
implements JsonSerializable<OperationStatusError>

An error from the Azure Bare Metal Infrastructure service.

Constructor Summary

Constructor Description
OperationStatusError()

Creates an instance of OperationStatusError class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: Server-defined set of error codes.

static OperationStatusError fromJson(JsonReader jsonReader)

Reads an instance of OperationStatusError from the JsonReader.

String message()

Get the message property: Human-readable representation of the error.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

OperationStatusError withCode(String code)

Set the code property: Server-defined set of error codes.

OperationStatusError withMessage(String message)

Set the message property: Human-readable representation of the error.

Methods inherited from java.lang.Object

Constructor Details

OperationStatusError

public OperationStatusError()

Creates an instance of OperationStatusError class.

Method Details

code

public String code()

Get the code property: Server-defined set of error codes.

Returns:

the code value.

fromJson

public static OperationStatusError fromJson(JsonReader jsonReader)

Reads an instance of OperationStatusError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

message

public String message()

Get the message property: Human-readable representation of the error.

Returns:

the message value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCode

public OperationStatusError withCode(String code)

Set the code property: Server-defined set of error codes.

Parameters:

code - the code value to set.

Returns:

the OperationStatusError object itself.

withMessage

public OperationStatusError withMessage(String message)

Set the message property: Human-readable representation of the error.

Parameters:

message - the message value to set.

Returns:

the OperationStatusError object itself.

Applies to