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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final CompositeAlarmArgs Empty = new CompositeAlarmArgs();

    /**
     * Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to `true`.
     * 
     */
    @Import(name="actionsEnabled")
    private @Nullable Output<Boolean> actionsEnabled;

    /**
     * @return Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> actionsEnabled() {
        return Optional.ofNullable(this.actionsEnabled);
    }

    /**
     * The set of actions to execute when this alarm transitions to the `ALARM` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    @Import(name="alarmActions")
    private @Nullable Output<List<String>> alarmActions;

    /**
     * @return The set of actions to execute when this alarm transitions to the `ALARM` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    public Optional<Output<List<String>>> alarmActions() {
        return Optional.ofNullable(this.alarmActions);
    }

    /**
     * The description for the composite alarm.
     * 
     */
    @Import(name="alarmDescription")
    private @Nullable Output<String> alarmDescription;

    /**
     * @return The description for the composite alarm.
     * 
     */
    public Optional<Output<String>> alarmDescription() {
        return Optional.ofNullable(this.alarmDescription);
    }

    /**
     * The name for the composite alarm. This name must be unique within the region.
     * 
     */
    @Import(name="alarmName", required=true)
    private Output<String> alarmName;

    /**
     * @return The name for the composite alarm. This name must be unique within the region.
     * 
     */
    public Output<String> alarmName() {
        return this.alarmName;
    }

    /**
     * An expression that specifies which other alarms are to be evaluated to determine this composite alarm&#39;s state. For syntax, see [Creating a Composite Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html). The maximum length is 10240 characters.
     * 
     */
    @Import(name="alarmRule", required=true)
    private Output<String> alarmRule;

    /**
     * @return An expression that specifies which other alarms are to be evaluated to determine this composite alarm&#39;s state. For syntax, see [Creating a Composite Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html). The maximum length is 10240 characters.
     * 
     */
    public Output<String> alarmRule() {
        return this.alarmRule;
    }

    /**
     * The set of actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    @Import(name="insufficientDataActions")
    private @Nullable Output<List<String>> insufficientDataActions;

    /**
     * @return The set of actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    public Optional<Output<List<String>>> insufficientDataActions() {
        return Optional.ofNullable(this.insufficientDataActions);
    }

    /**
     * The set of actions to execute when this alarm transitions to an `OK` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    @Import(name="okActions")
    private @Nullable Output<List<String>> okActions;

    /**
     * @return The set of actions to execute when this alarm transitions to an `OK` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
     * 
     */
    public Optional<Output<List<String>>> okActions() {
        return Optional.ofNullable(this.okActions);
    }

    /**
     * A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private CompositeAlarmArgs() {}

    private CompositeAlarmArgs(CompositeAlarmArgs $) {
        this.actionsEnabled = $.actionsEnabled;
        this.alarmActions = $.alarmActions;
        this.alarmDescription = $.alarmDescription;
        this.alarmName = $.alarmName;
        this.alarmRule = $.alarmRule;
        this.insufficientDataActions = $.insufficientDataActions;
        this.okActions = $.okActions;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private CompositeAlarmArgs $;

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

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

        /**
         * @param actionsEnabled Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder actionsEnabled(@Nullable Output<Boolean> actionsEnabled) {
            $.actionsEnabled = actionsEnabled;
            return this;
        }

        /**
         * @param actionsEnabled Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder actionsEnabled(Boolean actionsEnabled) {
            return actionsEnabled(Output.of(actionsEnabled));
        }

        /**
         * @param alarmActions The set of actions to execute when this alarm transitions to the `ALARM` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder alarmActions(@Nullable Output<List<String>> alarmActions) {
            $.alarmActions = alarmActions;
            return this;
        }

        /**
         * @param alarmActions The set of actions to execute when this alarm transitions to the `ALARM` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder alarmActions(List<String> alarmActions) {
            return alarmActions(Output.of(alarmActions));
        }

        /**
         * @param alarmActions The set of actions to execute when this alarm transitions to the `ALARM` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder alarmActions(String... alarmActions) {
            return alarmActions(List.of(alarmActions));
        }

        /**
         * @param alarmDescription The description for the composite alarm.
         * 
         * @return builder
         * 
         */
        public Builder alarmDescription(@Nullable Output<String> alarmDescription) {
            $.alarmDescription = alarmDescription;
            return this;
        }

        /**
         * @param alarmDescription The description for the composite alarm.
         * 
         * @return builder
         * 
         */
        public Builder alarmDescription(String alarmDescription) {
            return alarmDescription(Output.of(alarmDescription));
        }

        /**
         * @param alarmName The name for the composite alarm. This name must be unique within the region.
         * 
         * @return builder
         * 
         */
        public Builder alarmName(Output<String> alarmName) {
            $.alarmName = alarmName;
            return this;
        }

        /**
         * @param alarmName The name for the composite alarm. This name must be unique within the region.
         * 
         * @return builder
         * 
         */
        public Builder alarmName(String alarmName) {
            return alarmName(Output.of(alarmName));
        }

        /**
         * @param alarmRule An expression that specifies which other alarms are to be evaluated to determine this composite alarm&#39;s state. For syntax, see [Creating a Composite Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html). The maximum length is 10240 characters.
         * 
         * @return builder
         * 
         */
        public Builder alarmRule(Output<String> alarmRule) {
            $.alarmRule = alarmRule;
            return this;
        }

        /**
         * @param alarmRule An expression that specifies which other alarms are to be evaluated to determine this composite alarm&#39;s state. For syntax, see [Creating a Composite Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html). The maximum length is 10240 characters.
         * 
         * @return builder
         * 
         */
        public Builder alarmRule(String alarmRule) {
            return alarmRule(Output.of(alarmRule));
        }

        /**
         * @param insufficientDataActions The set of actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder insufficientDataActions(@Nullable Output<List<String>> insufficientDataActions) {
            $.insufficientDataActions = insufficientDataActions;
            return this;
        }

        /**
         * @param insufficientDataActions The set of actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder insufficientDataActions(List<String> insufficientDataActions) {
            return insufficientDataActions(Output.of(insufficientDataActions));
        }

        /**
         * @param insufficientDataActions The set of actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder insufficientDataActions(String... insufficientDataActions) {
            return insufficientDataActions(List.of(insufficientDataActions));
        }

        /**
         * @param okActions The set of actions to execute when this alarm transitions to an `OK` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder okActions(@Nullable Output<List<String>> okActions) {
            $.okActions = okActions;
            return this;
        }

        /**
         * @param okActions The set of actions to execute when this alarm transitions to an `OK` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder okActions(List<String> okActions) {
            return okActions(Output.of(okActions));
        }

        /**
         * @param okActions The set of actions to execute when this alarm transitions to an `OK` state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed.
         * 
         * @return builder
         * 
         */
        public Builder okActions(String... okActions) {
            return okActions(List.of(okActions));
        }

        /**
         * @param tags A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        public CompositeAlarmArgs build() {
            $.alarmName = Objects.requireNonNull($.alarmName, "expected parameter 'alarmName' to be non-null");
            $.alarmRule = Objects.requireNonNull($.alarmRule, "expected parameter 'alarmRule' to be non-null");
            return $;
        }
    }

}
