Class AgentPropertiesErrorDetails

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

public final class AgentPropertiesErrorDetails extends Object implements com.azure.json.JsonSerializable<AgentPropertiesErrorDetails>
The AgentPropertiesErrorDetails model.
  • Constructor Details

    • AgentPropertiesErrorDetails

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

    • code

      public String code()
      Get the code property: Error code reported by Agent.
      Returns:
      the code value.
    • withCode

      public AgentPropertiesErrorDetails withCode(String code)
      Set the code property: Error code reported by Agent.
      Parameters:
      code - the code value to set.
      Returns:
      the AgentPropertiesErrorDetails object itself.
    • message

      public String message()
      Get the message property: Expanded description of reported error code.
      Returns:
      the message value.
    • withMessage

      public AgentPropertiesErrorDetails withMessage(String message)
      Set the message property: Expanded description of reported error code.
      Parameters:
      message - the message value to set.
      Returns:
      the AgentPropertiesErrorDetails 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<AgentPropertiesErrorDetails>
      Throws:
      IOException
    • fromJson

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