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

public final class AgentUpgrade extends Object implements com.azure.json.JsonSerializable<AgentUpgrade>
The info w.r.t Agent Upgrade.
  • Constructor Details

    • AgentUpgrade

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

    • desiredVersion

      public String desiredVersion()
      Get the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine.
      Returns:
      the desiredVersion value.
    • withDesiredVersion

      public AgentUpgrade withDesiredVersion(String desiredVersion)
      Set the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine.
      Parameters:
      desiredVersion - the desiredVersion value to set.
      Returns:
      the AgentUpgrade object itself.
    • correlationId

      public UUID correlationId()
      Get the correlationId property: The correlation ID associated with an agent upgrade operation.
      Returns:
      the correlationId value.
    • withCorrelationId

      public AgentUpgrade withCorrelationId(UUID correlationId)
      Set the correlationId property: The correlation ID associated with an agent upgrade operation.
      Parameters:
      correlationId - the correlationId value to set.
      Returns:
      the AgentUpgrade object itself.
    • enableAutomaticUpgrade

      public Boolean enableAutomaticUpgrade()
      Get the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded.
      Returns:
      the enableAutomaticUpgrade value.
    • withEnableAutomaticUpgrade

      public AgentUpgrade withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade)
      Set the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded.
      Parameters:
      enableAutomaticUpgrade - the enableAutomaticUpgrade value to set.
      Returns:
      the AgentUpgrade object itself.
    • lastAttemptDesiredVersion

      public String lastAttemptDesiredVersion()
      Get the lastAttemptDesiredVersion property: Specifies the version of the last attempt.
      Returns:
      the lastAttemptDesiredVersion value.
    • lastAttemptTimestamp

      public OffsetDateTime lastAttemptTimestamp()
      Get the lastAttemptTimestamp property: Timestamp of last upgrade attempt.
      Returns:
      the lastAttemptTimestamp value.
    • lastAttemptStatus

      public LastAttemptStatusEnum lastAttemptStatus()
      Get the lastAttemptStatus property: Specifies the status of Agent Upgrade.
      Returns:
      the lastAttemptStatus value.
    • lastAttemptMessage

      public String lastAttemptMessage()
      Get the lastAttemptMessage property: Failure message of last upgrade attempt if any.
      Returns:
      the lastAttemptMessage value.
    • 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<AgentUpgrade>
      Throws:
      IOException
    • fromJson

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