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

com.pulumi.azurenative.cdn.inputs.HeaderActionParametersArgs 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.cdn.inputs;

import com.pulumi.azurenative.cdn.enums.HeaderAction;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines the parameters for the request header action.
 * 
 */
public final class HeaderActionParametersArgs extends com.pulumi.resources.ResourceArgs {

    public static final HeaderActionParametersArgs Empty = new HeaderActionParametersArgs();

    /**
     * Action to perform
     * 
     */
    @Import(name="headerAction", required=true)
    private Output> headerAction;

    /**
     * @return Action to perform
     * 
     */
    public Output> headerAction() {
        return this.headerAction;
    }

    /**
     * Name of the header to modify
     * 
     */
    @Import(name="headerName", required=true)
    private Output headerName;

    /**
     * @return Name of the header to modify
     * 
     */
    public Output headerName() {
        return this.headerName;
    }

    @Import(name="typeName", required=true)
    private Output typeName;

    public Output typeName() {
        return this.typeName;
    }

    /**
     * Value for the specified action
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return Value for the specified action
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(this.value);
    }

    private HeaderActionParametersArgs() {}

    private HeaderActionParametersArgs(HeaderActionParametersArgs $) {
        this.headerAction = $.headerAction;
        this.headerName = $.headerName;
        this.typeName = $.typeName;
        this.value = $.value;
    }

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

    public static final class Builder {
        private HeaderActionParametersArgs $;

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

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

        /**
         * @param headerAction Action to perform
         * 
         * @return builder
         * 
         */
        public Builder headerAction(Output> headerAction) {
            $.headerAction = headerAction;
            return this;
        }

        /**
         * @param headerAction Action to perform
         * 
         * @return builder
         * 
         */
        public Builder headerAction(Either headerAction) {
            return headerAction(Output.of(headerAction));
        }

        /**
         * @param headerAction Action to perform
         * 
         * @return builder
         * 
         */
        public Builder headerAction(String headerAction) {
            return headerAction(Either.ofLeft(headerAction));
        }

        /**
         * @param headerAction Action to perform
         * 
         * @return builder
         * 
         */
        public Builder headerAction(HeaderAction headerAction) {
            return headerAction(Either.ofRight(headerAction));
        }

        /**
         * @param headerName Name of the header to modify
         * 
         * @return builder
         * 
         */
        public Builder headerName(Output headerName) {
            $.headerName = headerName;
            return this;
        }

        /**
         * @param headerName Name of the header to modify
         * 
         * @return builder
         * 
         */
        public Builder headerName(String headerName) {
            return headerName(Output.of(headerName));
        }

        public Builder typeName(Output typeName) {
            $.typeName = typeName;
            return this;
        }

        public Builder typeName(String typeName) {
            return typeName(Output.of(typeName));
        }

        /**
         * @param value Value for the specified action
         * 
         * @return builder
         * 
         */
        public Builder value(@Nullable Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value Value for the specified action
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public HeaderActionParametersArgs build() {
            if ($.headerAction == null) {
                throw new MissingRequiredPropertyException("HeaderActionParametersArgs", "headerAction");
            }
            if ($.headerName == null) {
                throw new MissingRequiredPropertyException("HeaderActionParametersArgs", "headerName");
            }
            if ($.typeName == null) {
                throw new MissingRequiredPropertyException("HeaderActionParametersArgs", "typeName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy