
com.pulumi.azurenative.consumption.outputs.NotificationResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.consumption.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class NotificationResponse {
/**
* @return 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.
*
*/
private List contactEmails;
/**
* @return 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.
*
*/
private @Nullable List contactGroups;
/**
* @return Contact roles to send the budget notification to when the threshold is exceeded.
*
*/
private @Nullable List contactRoles;
/**
* @return The notification is enabled or not.
*
*/
private Boolean enabled;
/**
* @return Language in which the recipient will receive the notification
*
*/
private @Nullable String locale;
/**
* @return The comparison operator.
*
*/
private String operator;
/**
* @return 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.
*
*/
private Double threshold;
/**
* @return The type of threshold
*
*/
private @Nullable String thresholdType;
private NotificationResponse() {}
/**
* @return 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.
*
*/
public List contactEmails() {
return this.contactEmails;
}
/**
* @return 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.
*
*/
public List contactGroups() {
return this.contactGroups == null ? List.of() : this.contactGroups;
}
/**
* @return Contact roles to send the budget notification to when the threshold is exceeded.
*
*/
public List contactRoles() {
return this.contactRoles == null ? List.of() : this.contactRoles;
}
/**
* @return The notification is enabled or not.
*
*/
public Boolean enabled() {
return this.enabled;
}
/**
* @return Language in which the recipient will receive the notification
*
*/
public Optional locale() {
return Optional.ofNullable(this.locale);
}
/**
* @return The comparison operator.
*
*/
public String operator() {
return this.operator;
}
/**
* @return 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.
*
*/
public Double threshold() {
return this.threshold;
}
/**
* @return The type of threshold
*
*/
public Optional thresholdType() {
return Optional.ofNullable(this.thresholdType);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(NotificationResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private List contactEmails;
private @Nullable List contactGroups;
private @Nullable List contactRoles;
private Boolean enabled;
private @Nullable String locale;
private String operator;
private Double threshold;
private @Nullable String thresholdType;
public Builder() {}
public Builder(NotificationResponse defaults) {
Objects.requireNonNull(defaults);
this.contactEmails = defaults.contactEmails;
this.contactGroups = defaults.contactGroups;
this.contactRoles = defaults.contactRoles;
this.enabled = defaults.enabled;
this.locale = defaults.locale;
this.operator = defaults.operator;
this.threshold = defaults.threshold;
this.thresholdType = defaults.thresholdType;
}
@CustomType.Setter
public Builder contactEmails(List contactEmails) {
if (contactEmails == null) {
throw new MissingRequiredPropertyException("NotificationResponse", "contactEmails");
}
this.contactEmails = contactEmails;
return this;
}
public Builder contactEmails(String... contactEmails) {
return contactEmails(List.of(contactEmails));
}
@CustomType.Setter
public Builder contactGroups(@Nullable List contactGroups) {
this.contactGroups = contactGroups;
return this;
}
public Builder contactGroups(String... contactGroups) {
return contactGroups(List.of(contactGroups));
}
@CustomType.Setter
public Builder contactRoles(@Nullable List contactRoles) {
this.contactRoles = contactRoles;
return this;
}
public Builder contactRoles(String... contactRoles) {
return contactRoles(List.of(contactRoles));
}
@CustomType.Setter
public Builder enabled(Boolean enabled) {
if (enabled == null) {
throw new MissingRequiredPropertyException("NotificationResponse", "enabled");
}
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder locale(@Nullable String locale) {
this.locale = locale;
return this;
}
@CustomType.Setter
public Builder operator(String operator) {
if (operator == null) {
throw new MissingRequiredPropertyException("NotificationResponse", "operator");
}
this.operator = operator;
return this;
}
@CustomType.Setter
public Builder threshold(Double threshold) {
if (threshold == null) {
throw new MissingRequiredPropertyException("NotificationResponse", "threshold");
}
this.threshold = threshold;
return this;
}
@CustomType.Setter
public Builder thresholdType(@Nullable String thresholdType) {
this.thresholdType = thresholdType;
return this;
}
public NotificationResponse build() {
final var _resultValue = new NotificationResponse();
_resultValue.contactEmails = contactEmails;
_resultValue.contactGroups = contactGroups;
_resultValue.contactRoles = contactRoles;
_resultValue.enabled = enabled;
_resultValue.locale = locale;
_resultValue.operator = operator;
_resultValue.threshold = threshold;
_resultValue.thresholdType = thresholdType;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy