Class RecommendedActionStateInfo

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

public final class RecommendedActionStateInfo extends Object implements com.azure.json.JsonSerializable<RecommendedActionStateInfo>
Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.
  • Constructor Details

    • RecommendedActionStateInfo

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

    • currentValue

      public RecommendedActionCurrentState currentValue()
      Get the currentValue property: Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action.
      Returns:
      the currentValue value.
    • withCurrentValue

      public RecommendedActionStateInfo withCurrentValue(RecommendedActionCurrentState currentValue)
      Set the currentValue property: Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action.
      Parameters:
      currentValue - the currentValue value to set.
      Returns:
      the RecommendedActionStateInfo object itself.
    • actionInitiatedBy

      public RecommendedActionInitiatedBy actionInitiatedBy()
      Get the actionInitiatedBy property: Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.
      Returns:
      the actionInitiatedBy value.
    • lastModified

      public OffsetDateTime lastModified()
      Get the lastModified property: Gets the time when the state was last modified.
      Returns:
      the lastModified 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<RecommendedActionStateInfo>
      Throws:
      IOException
    • fromJson

      public static RecommendedActionStateInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RecommendedActionStateInfo from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RecommendedActionStateInfo if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the RecommendedActionStateInfo.