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 Details

    • ErrorFieldContract

      public ErrorFieldContract()
      Creates an instance of ErrorFieldContract class.
  • Method Details

    • code

      public String code()
      Get the code property: Property level error code.
      Returns:
      the code value.
    • withCode

      public ErrorFieldContract withCode(String code)
      Set the code property: Property level error code.
      Parameters:
      code - the code value to set.
      Returns:
      the ErrorFieldContract object itself.
    • message

      public String message()
      Get the message property: Human-readable representation of property-level error.
      Returns:
      the message value.
    • withMessage

      public ErrorFieldContract withMessage(String message)
      Set the message property: Human-readable representation of property-level error.
      Parameters:
      message - the message value to set.
      Returns:
      the ErrorFieldContract object itself.
    • target

      public String target()
      Get the target property: Property name.
      Returns:
      the target value.
    • withTarget

      public ErrorFieldContract withTarget(String target)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ErrorFieldContract>
      Throws:
      IOException
    • fromJson

      public static ErrorFieldContract fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.