All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.insights.inputs.AutoscaleNotificationArgs 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.insights.inputs;

import com.pulumi.azurenative.insights.enums.OperationType;
import com.pulumi.azurenative.insights.inputs.EmailNotificationArgs;
import com.pulumi.azurenative.insights.inputs.WebhookNotificationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Autoscale notification.
 * 
 */
public final class AutoscaleNotificationArgs extends com.pulumi.resources.ResourceArgs {

    public static final AutoscaleNotificationArgs Empty = new AutoscaleNotificationArgs();

    /**
     * the email notification.
     * 
     */
    @Import(name="email")
    private @Nullable Output email;

    /**
     * @return the email notification.
     * 
     */
    public Optional> email() {
        return Optional.ofNullable(this.email);
    }

    /**
     * the operation associated with the notification and its value must be "scale"
     * 
     */
    @Import(name="operation", required=true)
    private Output operation;

    /**
     * @return the operation associated with the notification and its value must be "scale"
     * 
     */
    public Output operation() {
        return this.operation;
    }

    /**
     * the collection of webhook notifications.
     * 
     */
    @Import(name="webhooks")
    private @Nullable Output> webhooks;

    /**
     * @return the collection of webhook notifications.
     * 
     */
    public Optional>> webhooks() {
        return Optional.ofNullable(this.webhooks);
    }

    private AutoscaleNotificationArgs() {}

    private AutoscaleNotificationArgs(AutoscaleNotificationArgs $) {
        this.email = $.email;
        this.operation = $.operation;
        this.webhooks = $.webhooks;
    }

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

    public static final class Builder {
        private AutoscaleNotificationArgs $;

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

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

        /**
         * @param email the email notification.
         * 
         * @return builder
         * 
         */
        public Builder email(@Nullable Output email) {
            $.email = email;
            return this;
        }

        /**
         * @param email the email notification.
         * 
         * @return builder
         * 
         */
        public Builder email(EmailNotificationArgs email) {
            return email(Output.of(email));
        }

        /**
         * @param operation the operation associated with the notification and its value must be "scale"
         * 
         * @return builder
         * 
         */
        public Builder operation(Output operation) {
            $.operation = operation;
            return this;
        }

        /**
         * @param operation the operation associated with the notification and its value must be "scale"
         * 
         * @return builder
         * 
         */
        public Builder operation(OperationType operation) {
            return operation(Output.of(operation));
        }

        /**
         * @param webhooks the collection of webhook notifications.
         * 
         * @return builder
         * 
         */
        public Builder webhooks(@Nullable Output> webhooks) {
            $.webhooks = webhooks;
            return this;
        }

        /**
         * @param webhooks the collection of webhook notifications.
         * 
         * @return builder
         * 
         */
        public Builder webhooks(List webhooks) {
            return webhooks(Output.of(webhooks));
        }

        /**
         * @param webhooks the collection of webhook notifications.
         * 
         * @return builder
         * 
         */
        public Builder webhooks(WebhookNotificationArgs... webhooks) {
            return webhooks(List.of(webhooks));
        }

        public AutoscaleNotificationArgs build() {
            if ($.operation == null) {
                throw new MissingRequiredPropertyException("AutoscaleNotificationArgs", "operation");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy