Class ErrorFieldContract
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ErrorFieldContract
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ErrorFieldContract>
public final class ErrorFieldContract
extends Object
implements com.azure.json.JsonSerializable<ErrorFieldContract>
Error Field contract.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Get the code property: Property level error code.static ErrorFieldContractfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ErrorFieldContract from the JsonReader.message()Get the message property: Human-readable representation of property-level error.target()Get the target property: Property name.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the code property: Property level error code.withMessage(String message) Set the message property: Human-readable representation of property-level error.withTarget(String target) Set the target property: Property name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ErrorFieldContract
public ErrorFieldContract()Creates an instance of ErrorFieldContract class.
-
-
Method Details
-
code
Get the code property: Property level error code.- Returns:
- the code value.
-
withCode
Set the code property: Property level error code.- Parameters:
code- the code value to set.- Returns:
- the ErrorFieldContract object itself.
-
message
Get the message property: Human-readable representation of property-level error.- Returns:
- the message value.
-
withMessage
Set the message property: Human-readable representation of property-level error.- Parameters:
message- the message value to set.- Returns:
- the ErrorFieldContract object itself.
-
target
Get the target property: Property name.- Returns:
- the target value.
-
withTarget
Set the target property: Property name.- Parameters:
target- the target value to set.- Returns:
- the ErrorFieldContract object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ErrorFieldContract>- Throws:
IOException
-
fromJson
Reads an instance of ErrorFieldContract from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ErrorFieldContract 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 ErrorFieldContract.
-