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 Summary
ConstructorsConstructorDescriptionCreates an instance of CostThresholdProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the displayOnChart property: Indicates whether this threshold will be displayed on cost charts.static CostThresholdProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CostThresholdProperties from the JsonReader.Get the notificationSent property: Indicates the datetime when notifications were last sent for this threshold.Get the percentageThreshold property: The value of the percentage cost threshold.Get the sendNotificationWhenExceeded property: Indicates whether notifications will be sent when this threshold is exceeded.Get the thresholdId property: The ID of the cost threshold item.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDisplayOnChart
(CostThresholdStatus displayOnChart) Set the displayOnChart property: Indicates whether this threshold will be displayed on cost charts.withNotificationSent
(String notificationSent) Set the notificationSent property: Indicates the datetime when notifications were last sent for this threshold.withPercentageThreshold
(PercentageCostThresholdProperties percentageThreshold) Set the percentageThreshold property: The value of the percentage cost threshold.withSendNotificationWhenExceeded
(CostThresholdStatus sendNotificationWhenExceeded) Set the sendNotificationWhenExceeded property: Indicates whether notifications will be sent when this threshold is exceeded.withThresholdId
(String thresholdId) Set the thresholdId property: The ID of the cost threshold item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CostThresholdProperties
public CostThresholdProperties()Creates an instance of CostThresholdProperties class.
-
-
Method Details
-
thresholdId
Get the thresholdId property: The ID of the cost threshold item.- Returns:
- the thresholdId value.
-
withThresholdId
Set the thresholdId property: The ID of the cost threshold item.- Parameters:
thresholdId
- the thresholdId value to set.- Returns:
- the CostThresholdProperties object itself.
-
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
Get the displayOnChart property: Indicates whether this threshold will be displayed on cost charts.- Returns:
- the displayOnChart value.
-
withDisplayOnChart
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
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
Get the notificationSent property: Indicates the datetime when notifications were last sent for this threshold.- Returns:
- the notificationSent value.
-
withNotificationSent
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
- Specified by:
toJson
in interfacecom.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.
-