Class Notification
- java.lang.Object
-
- com.azure.resourcemanager.consumption.models.Notification
-
public final class Notification extends Object
The notification associated with a budget.
-
-
Constructor Summary
Constructors Constructor Description Notification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
contactEmails()
Get the contactEmails property: Email addresses to send the budget notification to when the threshold is exceeded.List<String>
contactGroups()
Get the contactGroups property: Action groups to send the budget notification to when the threshold is exceeded.List<String>
contactRoles()
Get the contactRoles property: Contact roles to send the budget notification to when the threshold is exceeded.boolean
enabled()
Get the enabled property: The notification is enabled or not.CultureCode
locale()
Get the locale property: Language in which the recipient will receive the notification.OperatorType
operator()
Get the operator property: The comparison operator.BigDecimal
threshold()
Get the threshold property: Threshold value associated with a notification.ThresholdType
thresholdType()
Get the thresholdType property: The type of threshold.void
validate()
Validates the instance.Notification
withContactEmails(List<String> contactEmails)
Set the contactEmails property: Email addresses to send the budget notification to when the threshold is exceeded.Notification
withContactGroups(List<String> contactGroups)
Set the contactGroups property: Action groups to send the budget notification to when the threshold is exceeded.Notification
withContactRoles(List<String> contactRoles)
Set the contactRoles property: Contact roles to send the budget notification to when the threshold is exceeded.Notification
withEnabled(boolean enabled)
Set the enabled property: The notification is enabled or not.Notification
withLocale(CultureCode locale)
Set the locale property: Language in which the recipient will receive the notification.Notification
withOperator(OperatorType operator)
Set the operator property: The comparison operator.Notification
withThreshold(BigDecimal threshold)
Set the threshold property: Threshold value associated with a notification.Notification
withThresholdType(ThresholdType thresholdType)
Set the thresholdType property: The type of threshold.
-
-
-
Method Detail
-
enabled
public boolean enabled()
Get the enabled property: The notification is enabled or not.- Returns:
- the enabled value.
-
withEnabled
public Notification withEnabled(boolean enabled)
Set the enabled property: The notification is enabled or not.- Parameters:
enabled
- the enabled value to set.- Returns:
- the Notification object itself.
-
operator
public OperatorType operator()
Get the operator property: The comparison operator.- Returns:
- the operator value.
-
withOperator
public Notification withOperator(OperatorType operator)
Set the operator property: The comparison operator.- Parameters:
operator
- the operator value to set.- Returns:
- the Notification object itself.
-
threshold
public BigDecimal threshold()
Get the threshold property: Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.- Returns:
- the threshold value.
-
withThreshold
public Notification withThreshold(BigDecimal threshold)
Set the threshold property: Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.- Parameters:
threshold
- the threshold value to set.- Returns:
- the Notification object itself.
-
contactEmails
public List<String> contactEmails()
Get the contactEmails property: Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.- Returns:
- the contactEmails value.
-
withContactEmails
public Notification withContactEmails(List<String> contactEmails)
Set the contactEmails property: Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.- Parameters:
contactEmails
- the contactEmails value to set.- Returns:
- the Notification object itself.
-
contactRoles
public List<String> contactRoles()
Get the contactRoles property: Contact roles to send the budget notification to when the threshold is exceeded.- Returns:
- the contactRoles value.
-
withContactRoles
public Notification withContactRoles(List<String> contactRoles)
Set the contactRoles property: Contact roles to send the budget notification to when the threshold is exceeded.- Parameters:
contactRoles
- the contactRoles value to set.- Returns:
- the Notification object itself.
-
contactGroups
public List<String> contactGroups()
Get the contactGroups property: Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.- Returns:
- the contactGroups value.
-
withContactGroups
public Notification withContactGroups(List<String> contactGroups)
Set the contactGroups property: Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.- Parameters:
contactGroups
- the contactGroups value to set.- Returns:
- the Notification object itself.
-
thresholdType
public ThresholdType thresholdType()
Get the thresholdType property: The type of threshold.- Returns:
- the thresholdType value.
-
withThresholdType
public Notification withThresholdType(ThresholdType thresholdType)
Set the thresholdType property: The type of threshold.- Parameters:
thresholdType
- the thresholdType value to set.- Returns:
- the Notification object itself.
-
locale
public CultureCode locale()
Get the locale property: Language in which the recipient will receive the notification.- Returns:
- the locale value.
-
withLocale
public Notification withLocale(CultureCode locale)
Set the locale property: Language in which the recipient will receive the notification.- Parameters:
locale
- the locale value to set.- Returns:
- the Notification object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-