ValidationError Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.models.ValidationError

Implements

public final class ValidationError
implements JsonSerializable<ValidationError>

Description about the errors happen while performing migration validation.

Constructor Summary

Constructor Description
ValidationError()

Creates an instance of ValidationError class.

Method Summary

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

Reads an instance of ValidationError from the JsonReader.

Severity severity()

Get the severity property: Severity of the error.

String text()

Get the text property: Error Text.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ValidationError withSeverity(Severity severity)

Set the severity property: Severity of the error.

ValidationError withText(String text)

Set the text property: Error Text.

Methods inherited from java.lang.Object

Constructor Details

ValidationError

public ValidationError()

Creates an instance of ValidationError class.

Method Details

fromJson

public static ValidationError fromJson(JsonReader jsonReader)

Reads an instance of ValidationError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

severity

public Severity severity()

Get the severity property: Severity of the error.

Returns:

the severity value.

text

public String text()

Get the text property: Error Text.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withSeverity

public ValidationError withSeverity(Severity severity)

Set the severity property: Severity of the error.

Parameters:

severity - the severity value to set.

Returns:

the ValidationError object itself.

withText

public ValidationError withText(String text)

Set the text property: Error Text.

Parameters:

text - the text value to set.

Returns:

the ValidationError object itself.

Applies to