// *** 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.azure.monitoring.outputs;

import com.pulumi.azure.monitoring.outputs.AutoscaleSettingNotificationEmail;
import com.pulumi.azure.monitoring.outputs.AutoscaleSettingNotificationWebhook;
import com.pulumi.core.annotations.CustomType;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AutoscaleSettingNotification {
    /**
     * @return A `email` block as defined below.
     * 
     */
    private @Nullable AutoscaleSettingNotificationEmail email;
    /**
     * @return One or more `webhook` blocks as defined below.
     * 
     */
    private @Nullable List<AutoscaleSettingNotificationWebhook> webhooks;

    private AutoscaleSettingNotification() {}
    /**
     * @return A `email` block as defined below.
     * 
     */
    public Optional<AutoscaleSettingNotificationEmail> email() {
        return Optional.ofNullable(this.email);
    }
    /**
     * @return One or more `webhook` blocks as defined below.
     * 
     */
    public List<AutoscaleSettingNotificationWebhook> webhooks() {
        return this.webhooks == null ? List.of() : this.webhooks;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(AutoscaleSettingNotification defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable AutoscaleSettingNotificationEmail email;
        private @Nullable List<AutoscaleSettingNotificationWebhook> webhooks;
        public Builder() {}
        public Builder(AutoscaleSettingNotification defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.email = defaults.email;
    	      this.webhooks = defaults.webhooks;
        }

        @CustomType.Setter
        public Builder email(@Nullable AutoscaleSettingNotificationEmail email) {
            this.email = email;
            return this;
        }
        @CustomType.Setter
        public Builder webhooks(@Nullable List<AutoscaleSettingNotificationWebhook> webhooks) {
            this.webhooks = webhooks;
            return this;
        }
        public Builder webhooks(AutoscaleSettingNotificationWebhook... webhooks) {
            return webhooks(List.of(webhooks));
        }
        public AutoscaleSettingNotification build() {
            final var o = new AutoscaleSettingNotification();
            o.email = email;
            o.webhooks = webhooks;
            return o;
        }
    }
}
