Class AgentUpgrade
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the correlationId property: The correlation ID associated with an agent upgrade operation.Get the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine.Get the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded.static AgentUpgradefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AgentUpgrade from the JsonReader.Get the lastAttemptDesiredVersion property: Specifies the version of the last attempt.Get the lastAttemptMessage property: Failure message of last upgrade attempt if any.Get the lastAttemptStatus property: Specifies the status of Agent Upgrade.Get the lastAttemptTimestamp property: Timestamp of last upgrade attempt.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCorrelationId(UUID correlationId) Set the correlationId property: The correlation ID associated with an agent upgrade operation.withDesiredVersion(String desiredVersion) Set the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine.withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) Set the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded.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
-
AgentUpgrade
public AgentUpgrade()Creates an instance of AgentUpgrade class.
-
-
Method Details
-
desiredVersion
Get the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine.- Returns:
- the desiredVersion value.
-
withDesiredVersion
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
Get the correlationId property: The correlation ID associated with an agent upgrade operation.- Returns:
- the correlationId value.
-
withCorrelationId
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
Get the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded.- Returns:
- the enableAutomaticUpgrade value.
-
withEnableAutomaticUpgrade
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
Get the lastAttemptDesiredVersion property: Specifies the version of the last attempt.- Returns:
- the lastAttemptDesiredVersion value.
-
lastAttemptTimestamp
Get the lastAttemptTimestamp property: Timestamp of last upgrade attempt.- Returns:
- the lastAttemptTimestamp value.
-
lastAttemptStatus
Get the lastAttemptStatus property: Specifies the status of Agent Upgrade.- Returns:
- the lastAttemptStatus value.
-
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AgentUpgrade>- Throws:
IOException
-
fromJson
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.
-