Class AdvisorProperties

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

public final class AdvisorProperties extends Object implements com.azure.json.JsonSerializable<AdvisorProperties>
Properties for a Database, Server or Elastic Pool Advisor.
  • Constructor Details

    • AdvisorProperties

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

    • advisorStatus

      public AdvisorStatus advisorStatus()
      Get the advisorStatus property: Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.
      Returns:
      the advisorStatus value.
    • autoExecuteStatus

      public AutoExecuteStatus autoExecuteStatus()
      Get the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'.
      Returns:
      the autoExecuteStatus value.
    • withAutoExecuteStatus

      public AdvisorProperties withAutoExecuteStatus(AutoExecuteStatus autoExecuteStatus)
      Set the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'.
      Parameters:
      autoExecuteStatus - the autoExecuteStatus value to set.
      Returns:
      the AdvisorProperties object itself.
    • autoExecuteStatusInheritedFrom

      public AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom()
      Get the autoExecuteStatusInheritedFrom property: Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).
      Returns:
      the autoExecuteStatusInheritedFrom value.
    • recommendationsStatus

      public String recommendationsStatus()
      Get the recommendationsStatus property: Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.
      Returns:
      the recommendationsStatus value.
    • lastChecked

      public OffsetDateTime lastChecked()
      Get the lastChecked property: Gets the time when the current resource was analyzed for recommendations by this advisor.
      Returns:
      the lastChecked value.
    • recommendedActions

      public List<RecommendedActionInner> recommendedActions()
      Get the recommendedActions property: Gets the recommended actions for this advisor.
      Returns:
      the recommendedActions 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<AdvisorProperties>
      Throws:
      IOException
    • fromJson

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