Class CostThresholdProperties

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

public final class CostThresholdProperties extends Object implements com.azure.json.JsonSerializable<CostThresholdProperties>
Properties of a cost threshold item.
  • Constructor Details

    • CostThresholdProperties

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

    • thresholdId

      public String thresholdId()
      Get the thresholdId property: The ID of the cost threshold item.
      Returns:
      the thresholdId value.
    • withThresholdId

      public CostThresholdProperties withThresholdId(String thresholdId)
      Set the thresholdId property: The ID of the cost threshold item.
      Parameters:
      thresholdId - the thresholdId value to set.
      Returns:
      the CostThresholdProperties object itself.
    • percentageThreshold

      public PercentageCostThresholdProperties percentageThreshold()
      Get the percentageThreshold property: The value of the percentage cost threshold.
      Returns:
      the percentageThreshold value.
    • withPercentageThreshold

      public CostThresholdProperties withPercentageThreshold(PercentageCostThresholdProperties percentageThreshold)
      Set the percentageThreshold property: The value of the percentage cost threshold.
      Parameters:
      percentageThreshold - the percentageThreshold value to set.
      Returns:
      the CostThresholdProperties object itself.
    • displayOnChart

      public CostThresholdStatus displayOnChart()
      Get the displayOnChart property: Indicates whether this threshold will be displayed on cost charts.
      Returns:
      the displayOnChart value.
    • withDisplayOnChart

      public CostThresholdProperties withDisplayOnChart(CostThresholdStatus displayOnChart)
      Set the displayOnChart property: Indicates whether this threshold will be displayed on cost charts.
      Parameters:
      displayOnChart - the displayOnChart value to set.
      Returns:
      the CostThresholdProperties object itself.
    • sendNotificationWhenExceeded

      public CostThresholdStatus sendNotificationWhenExceeded()
      Get the sendNotificationWhenExceeded property: Indicates whether notifications will be sent when this threshold is exceeded.
      Returns:
      the sendNotificationWhenExceeded value.
    • withSendNotificationWhenExceeded

      public CostThresholdProperties withSendNotificationWhenExceeded(CostThresholdStatus sendNotificationWhenExceeded)
      Set the sendNotificationWhenExceeded property: Indicates whether notifications will be sent when this threshold is exceeded.
      Parameters:
      sendNotificationWhenExceeded - the sendNotificationWhenExceeded value to set.
      Returns:
      the CostThresholdProperties object itself.
    • notificationSent

      public String notificationSent()
      Get the notificationSent property: Indicates the datetime when notifications were last sent for this threshold.
      Returns:
      the notificationSent value.
    • withNotificationSent

      public CostThresholdProperties withNotificationSent(String notificationSent)
      Set the notificationSent property: Indicates the datetime when notifications were last sent for this threshold.
      Parameters:
      notificationSent - the notificationSent value to set.
      Returns:
      the CostThresholdProperties object itself.
    • 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<CostThresholdProperties>
      Throws:
      IOException
    • fromJson

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