Class ObjectRecommendationProperties

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

public final class ObjectRecommendationProperties extends Object implements com.azure.json.JsonSerializable<ObjectRecommendationProperties>
Object recommendation properties.
  • Constructor Details

    • ObjectRecommendationProperties

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

    • initialRecommendedTime

      public OffsetDateTime initialRecommendedTime()
      Get the initialRecommendedTime property: Creation time (UTC) of this recommendation.
      Returns:
      the initialRecommendedTime value.
    • withInitialRecommendedTime

      public ObjectRecommendationProperties withInitialRecommendedTime(OffsetDateTime initialRecommendedTime)
      Set the initialRecommendedTime property: Creation time (UTC) of this recommendation.
      Parameters:
      initialRecommendedTime - the initialRecommendedTime value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • lastRecommendedTime

      public OffsetDateTime lastRecommendedTime()
      Get the lastRecommendedTime property: Last time (UTC) that this recommendation was produced.
      Returns:
      the lastRecommendedTime value.
    • withLastRecommendedTime

      public ObjectRecommendationProperties withLastRecommendedTime(OffsetDateTime lastRecommendedTime)
      Set the lastRecommendedTime property: Last time (UTC) that this recommendation was produced.
      Parameters:
      lastRecommendedTime - the lastRecommendedTime value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • timesRecommended

      public Integer timesRecommended()
      Get the timesRecommended property: Number of times this recommendation has been produced.
      Returns:
      the timesRecommended value.
    • withTimesRecommended

      public ObjectRecommendationProperties withTimesRecommended(Integer timesRecommended)
      Set the timesRecommended property: Number of times this recommendation has been produced.
      Parameters:
      timesRecommended - the timesRecommended value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • improvedQueryIds

      public List<Long> improvedQueryIds()
      Get the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if the recommendation is applied. The list is only populated for CREATE INDEX recommendations.
      Returns:
      the improvedQueryIds value.
    • withImprovedQueryIds

      public ObjectRecommendationProperties withImprovedQueryIds(List<Long> improvedQueryIds)
      Set the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if the recommendation is applied. The list is only populated for CREATE INDEX recommendations.
      Parameters:
      improvedQueryIds - the improvedQueryIds value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • recommendationReason

      public String recommendationReason()
      Get the recommendationReason property: Reason for this recommendation.
      Returns:
      the recommendationReason value.
    • withRecommendationReason

      public ObjectRecommendationProperties withRecommendationReason(String recommendationReason)
      Set the recommendationReason property: Reason for this recommendation.
      Parameters:
      recommendationReason - the recommendationReason value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • currentState

      public String currentState()
      Get the currentState property: Current state.
      Returns:
      the currentState value.
    • withCurrentState

      public ObjectRecommendationProperties withCurrentState(String currentState)
      Set the currentState property: Current state.
      Parameters:
      currentState - the currentState value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • recommendationType

      public RecommendationTypeEnum recommendationType()
      Get the recommendationType property: Type for this recommendation.
      Returns:
      the recommendationType value.
    • withRecommendationType

      public ObjectRecommendationProperties withRecommendationType(RecommendationTypeEnum recommendationType)
      Set the recommendationType property: Type for this recommendation.
      Parameters:
      recommendationType - the recommendationType value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • implementationDetails

      Get the implementationDetails property: Implementation details for the recommended action.
      Returns:
      the implementationDetails value.
    • withImplementationDetails

      public ObjectRecommendationProperties withImplementationDetails(ObjectRecommendationPropertiesImplementationDetails implementationDetails)
      Set the implementationDetails property: Implementation details for the recommended action.
      Parameters:
      implementationDetails - the implementationDetails value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • analyzedWorkload

      Get the analyzedWorkload property: Workload information for the recommended action.
      Returns:
      the analyzedWorkload value.
    • withAnalyzedWorkload

      Set the analyzedWorkload property: Workload information for the recommended action.
      Parameters:
      analyzedWorkload - the analyzedWorkload value to set.
      Returns:
      the ObjectRecommendationProperties object itself.
    • estimatedImpact

      public List<ImpactRecord> estimatedImpact()
      Get the estimatedImpact property: Estimated impact of this recommended action.
      Returns:
      the estimatedImpact value.
    • details

      public ObjectRecommendationDetails details()
      Get the details property: Recommendation details for the recommended action.
      Returns:
      the details 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<ObjectRecommendationProperties>
      Throws:
      IOException
    • fromJson

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