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

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

@CustomType
public final class DeploymentGroupAlarmConfiguration {
    /**
     * @return A list of alarms configured for the deployment group. _A maximum of 10 alarms can be added to a deployment group_.
     * 
     */
    private @Nullable List<String> alarms;
    /**
     * @return Indicates whether the alarm configuration is enabled. This option is useful when you want to temporarily deactivate alarm monitoring for a deployment group without having to add the same alarms again later.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from CloudWatch. The default value is `false`.
     * 
     */
    private @Nullable Boolean ignorePollAlarmFailure;

    private DeploymentGroupAlarmConfiguration() {}
    /**
     * @return A list of alarms configured for the deployment group. _A maximum of 10 alarms can be added to a deployment group_.
     * 
     */
    public List<String> alarms() {
        return this.alarms == null ? List.of() : this.alarms;
    }
    /**
     * @return Indicates whether the alarm configuration is enabled. This option is useful when you want to temporarily deactivate alarm monitoring for a deployment group without having to add the same alarms again later.
     * 
     */
    public Optional<Boolean> enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from CloudWatch. The default value is `false`.
     * 
     */
    public Optional<Boolean> ignorePollAlarmFailure() {
        return Optional.ofNullable(this.ignorePollAlarmFailure);
    }

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

    public static Builder builder(DeploymentGroupAlarmConfiguration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> alarms;
        private @Nullable Boolean enabled;
        private @Nullable Boolean ignorePollAlarmFailure;
        public Builder() {}
        public Builder(DeploymentGroupAlarmConfiguration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.alarms = defaults.alarms;
    	      this.enabled = defaults.enabled;
    	      this.ignorePollAlarmFailure = defaults.ignorePollAlarmFailure;
        }

        @CustomType.Setter
        public Builder alarms(@Nullable List<String> alarms) {
            this.alarms = alarms;
            return this;
        }
        public Builder alarms(String... alarms) {
            return alarms(List.of(alarms));
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {
            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder ignorePollAlarmFailure(@Nullable Boolean ignorePollAlarmFailure) {
            this.ignorePollAlarmFailure = ignorePollAlarmFailure;
            return this;
        }
        public DeploymentGroupAlarmConfiguration build() {
            final var o = new DeploymentGroupAlarmConfiguration();
            o.alarms = alarms;
            o.enabled = enabled;
            o.ignorePollAlarmFailure = ignorePollAlarmFailure;
            return o;
        }
    }
}
