CopyCompletionError Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.CopyCompletionError

Implements

public final class CopyCompletionError
implements JsonSerializable<CopyCompletionError>

Indicates the error details if the background copy of a resource created via the CopyStart operation fails.

Constructor Summary

Constructor Description
CopyCompletionError()

Creates an instance of CopyCompletionError class.

Method Summary

Modifier and Type Method and Description
CopyCompletionErrorReason errorCode()

Get the errorCode property: Indicates the error code if the background copy of a resource created via the CopyStart operation fails.

String errorMessage()

Get the errorMessage property: Indicates the error message if the background copy of a resource created via the CopyStart operation fails.

static CopyCompletionError fromJson(JsonReader jsonReader)

Reads an instance of CopyCompletionError from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CopyCompletionError withErrorCode(CopyCompletionErrorReason errorCode)

Set the errorCode property: Indicates the error code if the background copy of a resource created via the CopyStart operation fails.

CopyCompletionError withErrorMessage(String errorMessage)

Set the errorMessage property: Indicates the error message if the background copy of a resource created via the CopyStart operation fails.

Methods inherited from java.lang.Object

Constructor Details

CopyCompletionError

public CopyCompletionError()

Creates an instance of CopyCompletionError class.

Method Details

errorCode

public CopyCompletionErrorReason errorCode()

Get the errorCode property: Indicates the error code if the background copy of a resource created via the CopyStart operation fails.

Returns:

the errorCode value.

errorMessage

public String errorMessage()

Get the errorMessage property: Indicates the error message if the background copy of a resource created via the CopyStart operation fails.

Returns:

the errorMessage value.

fromJson

public static CopyCompletionError fromJson(JsonReader jsonReader)

Reads an instance of CopyCompletionError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withErrorCode

public CopyCompletionError withErrorCode(CopyCompletionErrorReason errorCode)

Set the errorCode property: Indicates the error code if the background copy of a resource created via the CopyStart operation fails.

Parameters:

errorCode - the errorCode value to set.

Returns:

the CopyCompletionError object itself.

withErrorMessage

public CopyCompletionError withErrorMessage(String errorMessage)

Set the errorMessage property: Indicates the error message if the background copy of a resource created via the CopyStart operation fails.

Parameters:

errorMessage - the errorMessage value to set.

Returns:

the CopyCompletionError object itself.

Applies to