// *** 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.inputs;

import com.pulumi.azure.monitoring.inputs.ActionGroupWebhookReceiverAadAuthArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ActionGroupWebhookReceiverArgs extends com.pulumi.resources.ResourceArgs {

    public static final ActionGroupWebhookReceiverArgs Empty = new ActionGroupWebhookReceiverArgs();

    /**
     * The `aad_auth` block as defined below
     * 
     * &gt; **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook).
     * 
     */
    @Import(name="aadAuth")
    private @Nullable Output<ActionGroupWebhookReceiverAadAuthArgs> aadAuth;

    /**
     * @return The `aad_auth` block as defined below
     * 
     * &gt; **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook).
     * 
     */
    public Optional<Output<ActionGroupWebhookReceiverAadAuthArgs>> aadAuth() {
        return Optional.ofNullable(this.aadAuth);
    }

    /**
     * The name of the webhook receiver. Names must be unique (case-insensitive) across all receivers within an action group.
     * 
     */
    @Import(name="name", required=true)
    private Output<String> name;

    /**
     * @return The name of the webhook receiver. Names must be unique (case-insensitive) across all receivers within an action group.
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    /**
     * The URI where webhooks should be sent.
     * 
     */
    @Import(name="serviceUri", required=true)
    private Output<String> serviceUri;

    /**
     * @return The URI where webhooks should be sent.
     * 
     */
    public Output<String> serviceUri() {
        return this.serviceUri;
    }

    /**
     * Enables or disables the common alert schema.
     * 
     */
    @Import(name="useCommonAlertSchema")
    private @Nullable Output<Boolean> useCommonAlertSchema;

    /**
     * @return Enables or disables the common alert schema.
     * 
     */
    public Optional<Output<Boolean>> useCommonAlertSchema() {
        return Optional.ofNullable(this.useCommonAlertSchema);
    }

    private ActionGroupWebhookReceiverArgs() {}

    private ActionGroupWebhookReceiverArgs(ActionGroupWebhookReceiverArgs $) {
        this.aadAuth = $.aadAuth;
        this.name = $.name;
        this.serviceUri = $.serviceUri;
        this.useCommonAlertSchema = $.useCommonAlertSchema;
    }

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

    public static final class Builder {
        private ActionGroupWebhookReceiverArgs $;

        public Builder() {
            $ = new ActionGroupWebhookReceiverArgs();
        }

        public Builder(ActionGroupWebhookReceiverArgs defaults) {
            $ = new ActionGroupWebhookReceiverArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param aadAuth The `aad_auth` block as defined below
         * 
         * &gt; **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook).
         * 
         * @return builder
         * 
         */
        public Builder aadAuth(@Nullable Output<ActionGroupWebhookReceiverAadAuthArgs> aadAuth) {
            $.aadAuth = aadAuth;
            return this;
        }

        /**
         * @param aadAuth The `aad_auth` block as defined below
         * 
         * &gt; **NOTE:** Before adding a secure webhook receiver by setting `aad_auth`, please read [the configuration instruction of the AAD application](https://docs.microsoft.com/azure/azure-monitor/platform/action-groups#secure-webhook).
         * 
         * @return builder
         * 
         */
        public Builder aadAuth(ActionGroupWebhookReceiverAadAuthArgs aadAuth) {
            return aadAuth(Output.of(aadAuth));
        }

        /**
         * @param name The name of the webhook receiver. Names must be unique (case-insensitive) across all receivers within an action group.
         * 
         * @return builder
         * 
         */
        public Builder name(Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the webhook receiver. Names must be unique (case-insensitive) across all receivers within an action group.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param serviceUri The URI where webhooks should be sent.
         * 
         * @return builder
         * 
         */
        public Builder serviceUri(Output<String> serviceUri) {
            $.serviceUri = serviceUri;
            return this;
        }

        /**
         * @param serviceUri The URI where webhooks should be sent.
         * 
         * @return builder
         * 
         */
        public Builder serviceUri(String serviceUri) {
            return serviceUri(Output.of(serviceUri));
        }

        /**
         * @param useCommonAlertSchema Enables or disables the common alert schema.
         * 
         * @return builder
         * 
         */
        public Builder useCommonAlertSchema(@Nullable Output<Boolean> useCommonAlertSchema) {
            $.useCommonAlertSchema = useCommonAlertSchema;
            return this;
        }

        /**
         * @param useCommonAlertSchema Enables or disables the common alert schema.
         * 
         * @return builder
         * 
         */
        public Builder useCommonAlertSchema(Boolean useCommonAlertSchema) {
            return useCommonAlertSchema(Output.of(useCommonAlertSchema));
        }

        public ActionGroupWebhookReceiverArgs build() {
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            $.serviceUri = Objects.requireNonNull($.serviceUri, "expected parameter 'serviceUri' to be non-null");
            return $;
        }
    }

}
