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

com.pulumi.azurenative.cdn.inputs.PolicySettingsArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show newest version
// *** 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.cdn.inputs;

import com.pulumi.azurenative.cdn.enums.PolicyEnabledState;
import com.pulumi.azurenative.cdn.enums.PolicyMode;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines contents of a web application firewall global configuration
 * 
 */
public final class PolicySettingsArgs extends com.pulumi.resources.ResourceArgs {

    public static final PolicySettingsArgs Empty = new PolicySettingsArgs();

    /**
     * If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     * 
     */
    @Import(name="defaultCustomBlockResponseBody")
    private @Nullable Output defaultCustomBlockResponseBody;

    /**
     * @return If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     * 
     */
    public Optional> defaultCustomBlockResponseBody() {
        return Optional.ofNullable(this.defaultCustomBlockResponseBody);
    }

    /**
     * If the action type is block, this field defines the default customer overridable http response status code.
     * 
     */
    @Import(name="defaultCustomBlockResponseStatusCode")
    private @Nullable Output defaultCustomBlockResponseStatusCode;

    /**
     * @return If the action type is block, this field defines the default customer overridable http response status code.
     * 
     */
    public Optional> defaultCustomBlockResponseStatusCode() {
        return Optional.ofNullable(this.defaultCustomBlockResponseStatusCode);
    }

    /**
     * If action type is redirect, this field represents the default redirect URL for the client.
     * 
     */
    @Import(name="defaultRedirectUrl")
    private @Nullable Output defaultRedirectUrl;

    /**
     * @return If action type is redirect, this field represents the default redirect URL for the client.
     * 
     */
    public Optional> defaultRedirectUrl() {
        return Optional.ofNullable(this.defaultRedirectUrl);
    }

    /**
     * describes if the policy is in enabled state or disabled state
     * 
     */
    @Import(name="enabledState")
    private @Nullable Output> enabledState;

    /**
     * @return describes if the policy is in enabled state or disabled state
     * 
     */
    public Optional>> enabledState() {
        return Optional.ofNullable(this.enabledState);
    }

    /**
     * Describes if it is in detection mode or prevention mode at policy level.
     * 
     */
    @Import(name="mode")
    private @Nullable Output> mode;

    /**
     * @return Describes if it is in detection mode or prevention mode at policy level.
     * 
     */
    public Optional>> mode() {
        return Optional.ofNullable(this.mode);
    }

    private PolicySettingsArgs() {}

    private PolicySettingsArgs(PolicySettingsArgs $) {
        this.defaultCustomBlockResponseBody = $.defaultCustomBlockResponseBody;
        this.defaultCustomBlockResponseStatusCode = $.defaultCustomBlockResponseStatusCode;
        this.defaultRedirectUrl = $.defaultRedirectUrl;
        this.enabledState = $.enabledState;
        this.mode = $.mode;
    }

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

    public static final class Builder {
        private PolicySettingsArgs $;

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

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

        /**
         * @param defaultCustomBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
         * 
         * @return builder
         * 
         */
        public Builder defaultCustomBlockResponseBody(@Nullable Output defaultCustomBlockResponseBody) {
            $.defaultCustomBlockResponseBody = defaultCustomBlockResponseBody;
            return this;
        }

        /**
         * @param defaultCustomBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
         * 
         * @return builder
         * 
         */
        public Builder defaultCustomBlockResponseBody(String defaultCustomBlockResponseBody) {
            return defaultCustomBlockResponseBody(Output.of(defaultCustomBlockResponseBody));
        }

        /**
         * @param defaultCustomBlockResponseStatusCode If the action type is block, this field defines the default customer overridable http response status code.
         * 
         * @return builder
         * 
         */
        public Builder defaultCustomBlockResponseStatusCode(@Nullable Output defaultCustomBlockResponseStatusCode) {
            $.defaultCustomBlockResponseStatusCode = defaultCustomBlockResponseStatusCode;
            return this;
        }

        /**
         * @param defaultCustomBlockResponseStatusCode If the action type is block, this field defines the default customer overridable http response status code.
         * 
         * @return builder
         * 
         */
        public Builder defaultCustomBlockResponseStatusCode(Integer defaultCustomBlockResponseStatusCode) {
            return defaultCustomBlockResponseStatusCode(Output.of(defaultCustomBlockResponseStatusCode));
        }

        /**
         * @param defaultRedirectUrl If action type is redirect, this field represents the default redirect URL for the client.
         * 
         * @return builder
         * 
         */
        public Builder defaultRedirectUrl(@Nullable Output defaultRedirectUrl) {
            $.defaultRedirectUrl = defaultRedirectUrl;
            return this;
        }

        /**
         * @param defaultRedirectUrl If action type is redirect, this field represents the default redirect URL for the client.
         * 
         * @return builder
         * 
         */
        public Builder defaultRedirectUrl(String defaultRedirectUrl) {
            return defaultRedirectUrl(Output.of(defaultRedirectUrl));
        }

        /**
         * @param enabledState describes if the policy is in enabled state or disabled state
         * 
         * @return builder
         * 
         */
        public Builder enabledState(@Nullable Output> enabledState) {
            $.enabledState = enabledState;
            return this;
        }

        /**
         * @param enabledState describes if the policy is in enabled state or disabled state
         * 
         * @return builder
         * 
         */
        public Builder enabledState(Either enabledState) {
            return enabledState(Output.of(enabledState));
        }

        /**
         * @param enabledState describes if the policy is in enabled state or disabled state
         * 
         * @return builder
         * 
         */
        public Builder enabledState(String enabledState) {
            return enabledState(Either.ofLeft(enabledState));
        }

        /**
         * @param enabledState describes if the policy is in enabled state or disabled state
         * 
         * @return builder
         * 
         */
        public Builder enabledState(PolicyEnabledState enabledState) {
            return enabledState(Either.ofRight(enabledState));
        }

        /**
         * @param mode Describes if it is in detection mode or prevention mode at policy level.
         * 
         * @return builder
         * 
         */
        public Builder mode(@Nullable Output> mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode Describes if it is in detection mode or prevention mode at policy level.
         * 
         * @return builder
         * 
         */
        public Builder mode(Either mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param mode Describes if it is in detection mode or prevention mode at policy level.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Either.ofLeft(mode));
        }

        /**
         * @param mode Describes if it is in detection mode or prevention mode at policy level.
         * 
         * @return builder
         * 
         */
        public Builder mode(PolicyMode mode) {
            return mode(Either.ofRight(mode));
        }

        public PolicySettingsArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy