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

com.pulumi.azurenative.network.inputs.HeaderActionArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.network.inputs;

import com.pulumi.azurenative.network.enums.HeaderActionType;
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;


/**
 * An action that can manipulate an http header.
 * 
 */
public final class HeaderActionArgs extends com.pulumi.resources.ResourceArgs {

    public static final HeaderActionArgs Empty = new HeaderActionArgs();

    /**
     * Which type of manipulation to apply to the header.
     * 
     */
    @Import(name="headerActionType", required=true)
    private Output> headerActionType;

    /**
     * @return Which type of manipulation to apply to the header.
     * 
     */
    public Output> headerActionType() {
        return this.headerActionType;
    }

    /**
     * The name of the header this action will apply to.
     * 
     */
    @Import(name="headerName", required=true)
    private Output headerName;

    /**
     * @return The name of the header this action will apply to.
     * 
     */
    public Output headerName() {
        return this.headerName;
    }

    /**
     * The value to update the given header name with. This value is not used if the actionType is Delete.
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return The value to update the given header name with. This value is not used if the actionType is Delete.
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(this.value);
    }

    private HeaderActionArgs() {}

    private HeaderActionArgs(HeaderActionArgs $) {
        this.headerActionType = $.headerActionType;
        this.headerName = $.headerName;
        this.value = $.value;
    }

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

    public static final class Builder {
        private HeaderActionArgs $;

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

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

        /**
         * @param headerActionType Which type of manipulation to apply to the header.
         * 
         * @return builder
         * 
         */
        public Builder headerActionType(Output> headerActionType) {
            $.headerActionType = headerActionType;
            return this;
        }

        /**
         * @param headerActionType Which type of manipulation to apply to the header.
         * 
         * @return builder
         * 
         */
        public Builder headerActionType(Either headerActionType) {
            return headerActionType(Output.of(headerActionType));
        }

        /**
         * @param headerActionType Which type of manipulation to apply to the header.
         * 
         * @return builder
         * 
         */
        public Builder headerActionType(String headerActionType) {
            return headerActionType(Either.ofLeft(headerActionType));
        }

        /**
         * @param headerActionType Which type of manipulation to apply to the header.
         * 
         * @return builder
         * 
         */
        public Builder headerActionType(HeaderActionType headerActionType) {
            return headerActionType(Either.ofRight(headerActionType));
        }

        /**
         * @param headerName The name of the header this action will apply to.
         * 
         * @return builder
         * 
         */
        public Builder headerName(Output headerName) {
            $.headerName = headerName;
            return this;
        }

        /**
         * @param headerName The name of the header this action will apply to.
         * 
         * @return builder
         * 
         */
        public Builder headerName(String headerName) {
            return headerName(Output.of(headerName));
        }

        /**
         * @param value The value to update the given header name with. This value is not used if the actionType is Delete.
         * 
         * @return builder
         * 
         */
        public Builder value(@Nullable Output value) {
            $.value = value;
            return this;
        }

        /**
         * @param value The value to update the given header name with. This value is not used if the actionType is Delete.
         * 
         * @return builder
         * 
         */
        public Builder value(String value) {
            return value(Output.of(value));
        }

        public HeaderActionArgs build() {
            if ($.headerActionType == null) {
                throw new MissingRequiredPropertyException("HeaderActionArgs", "headerActionType");
            }
            if ($.headerName == null) {
                throw new MissingRequiredPropertyException("HeaderActionArgs", "headerName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy