ProvisioningError Class

  • java.lang.Object
    • com.azure.resourcemanager.imagebuilder.models.ProvisioningError

Implements

public final class ProvisioningError
implements JsonSerializable<ProvisioningError>

Describes the error happened when create or update an image template.

Constructor Summary

Constructor Description
ProvisioningError()

Creates an instance of ProvisioningError class.

Method Summary

Modifier and Type Method and Description
static ProvisioningError fromJson(JsonReader jsonReader)

Reads an instance of ProvisioningError from the JsonReader.

String message()

Get the message property: Verbose error message about the provisioning failure.

ProvisioningErrorCode provisioningErrorCode()

Get the provisioningErrorCode property: Error code of the provisioning failure.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ProvisioningError withMessage(String message)

Set the message property: Verbose error message about the provisioning failure.

ProvisioningError withProvisioningErrorCode(ProvisioningErrorCode provisioningErrorCode)

Set the provisioningErrorCode property: Error code of the provisioning failure.

Methods inherited from java.lang.Object

Constructor Details

ProvisioningError

public ProvisioningError()

Creates an instance of ProvisioningError class.

Method Details

fromJson

public static ProvisioningError fromJson(JsonReader jsonReader)

Reads an instance of ProvisioningError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

message

public String message()

Get the message property: Verbose error message about the provisioning failure.

Returns:

the message value.

provisioningErrorCode

public ProvisioningErrorCode provisioningErrorCode()

Get the provisioningErrorCode property: Error code of the provisioning failure.

Returns:

the provisioningErrorCode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMessage

public ProvisioningError withMessage(String message)

Set the message property: Verbose error message about the provisioning failure.

Parameters:

message - the message value to set.

Returns:

the ProvisioningError object itself.

withProvisioningErrorCode

public ProvisioningError withProvisioningErrorCode(ProvisioningErrorCode provisioningErrorCode)

Set the provisioningErrorCode property: Error code of the provisioning failure.

Parameters:

provisioningErrorCode - the provisioningErrorCode value to set.

Returns:

the ProvisioningError object itself.

Applies to