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

import com.pulumi.aws.wafv2.outputs.WebAclDefaultActionAllow;
import com.pulumi.aws.wafv2.outputs.WebAclDefaultActionBlock;
import com.pulumi.core.annotations.CustomType;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class WebAclDefaultAction {
    /**
     * @return Specifies that AWS WAF should allow requests by default. See `allow` below for details.
     * 
     */
    private @Nullable WebAclDefaultActionAllow allow;
    /**
     * @return Specifies that AWS WAF should block requests by default. See `block` below for details.
     * 
     */
    private @Nullable WebAclDefaultActionBlock block;

    private WebAclDefaultAction() {}
    /**
     * @return Specifies that AWS WAF should allow requests by default. See `allow` below for details.
     * 
     */
    public Optional<WebAclDefaultActionAllow> allow() {
        return Optional.ofNullable(this.allow);
    }
    /**
     * @return Specifies that AWS WAF should block requests by default. See `block` below for details.
     * 
     */
    public Optional<WebAclDefaultActionBlock> block() {
        return Optional.ofNullable(this.block);
    }

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

    public static Builder builder(WebAclDefaultAction defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable WebAclDefaultActionAllow allow;
        private @Nullable WebAclDefaultActionBlock block;
        public Builder() {}
        public Builder(WebAclDefaultAction defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allow = defaults.allow;
    	      this.block = defaults.block;
        }

        @CustomType.Setter
        public Builder allow(@Nullable WebAclDefaultActionAllow allow) {
            this.allow = allow;
            return this;
        }
        @CustomType.Setter
        public Builder block(@Nullable WebAclDefaultActionBlock block) {
            this.block = block;
            return this;
        }
        public WebAclDefaultAction build() {
            final var o = new WebAclDefaultAction();
            o.allow = allow;
            o.block = block;
            return o;
        }
    }
}
