Class ModuleErrorInfo

java.lang.Object
com.azure.resourcemanager.automation.models.ModuleErrorInfo
All Implemented Interfaces:
com.azure.json.JsonSerializable<ModuleErrorInfo>

public final class ModuleErrorInfo extends Object implements com.azure.json.JsonSerializable<ModuleErrorInfo>
Definition of the module error info type.
  • Constructor Details

    • ModuleErrorInfo

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

    • code

      public String code()
      Get the code property: Gets or sets the error code.
      Returns:
      the code value.
    • withCode

      public ModuleErrorInfo withCode(String code)
      Set the code property: Gets or sets the error code.
      Parameters:
      code - the code value to set.
      Returns:
      the ModuleErrorInfo object itself.
    • message

      public String message()
      Get the message property: Gets or sets the error message.
      Returns:
      the message value.
    • withMessage

      public ModuleErrorInfo withMessage(String message)
      Set the message property: Gets or sets the error message.
      Parameters:
      message - the message value to set.
      Returns:
      the ModuleErrorInfo 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<ModuleErrorInfo>
      Throws:
      IOException
    • fromJson

      public static ModuleErrorInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ModuleErrorInfo from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ModuleErrorInfo 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 ModuleErrorInfo.