// *** 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.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ScheduledQueryRulesAlertAction {
    /**
     * @return List of action group reference resource IDs.
     * 
     */
    private List<String> actionGroups;
    /**
     * @return Custom payload to be sent for all webhook payloads in alerting action.
     * 
     */
    private @Nullable String customWebhookPayload;
    /**
     * @return Custom subject override for all email ids in Azure action group.
     * 
     */
    private @Nullable String emailSubject;

    private ScheduledQueryRulesAlertAction() {}
    /**
     * @return List of action group reference resource IDs.
     * 
     */
    public List<String> actionGroups() {
        return this.actionGroups;
    }
    /**
     * @return Custom payload to be sent for all webhook payloads in alerting action.
     * 
     */
    public Optional<String> customWebhookPayload() {
        return Optional.ofNullable(this.customWebhookPayload);
    }
    /**
     * @return Custom subject override for all email ids in Azure action group.
     * 
     */
    public Optional<String> emailSubject() {
        return Optional.ofNullable(this.emailSubject);
    }

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

    public static Builder builder(ScheduledQueryRulesAlertAction defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List<String> actionGroups;
        private @Nullable String customWebhookPayload;
        private @Nullable String emailSubject;
        public Builder() {}
        public Builder(ScheduledQueryRulesAlertAction defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.actionGroups = defaults.actionGroups;
    	      this.customWebhookPayload = defaults.customWebhookPayload;
    	      this.emailSubject = defaults.emailSubject;
        }

        @CustomType.Setter
        public Builder actionGroups(List<String> actionGroups) {
            this.actionGroups = Objects.requireNonNull(actionGroups);
            return this;
        }
        public Builder actionGroups(String... actionGroups) {
            return actionGroups(List.of(actionGroups));
        }
        @CustomType.Setter
        public Builder customWebhookPayload(@Nullable String customWebhookPayload) {
            this.customWebhookPayload = customWebhookPayload;
            return this;
        }
        @CustomType.Setter
        public Builder emailSubject(@Nullable String emailSubject) {
            this.emailSubject = emailSubject;
            return this;
        }
        public ScheduledQueryRulesAlertAction build() {
            final var o = new ScheduledQueryRulesAlertAction();
            o.actionGroups = actionGroups;
            o.customWebhookPayload = customWebhookPayload;
            o.emailSubject = emailSubject;
            return o;
        }
    }
}
