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

com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSetRewriteRule 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.azure.network.outputs;

import com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSetRewriteRuleCondition;
import com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfiguration;
import com.pulumi.azure.network.outputs.ApplicationGatewayRewriteRuleSetRewriteRuleUrl;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ApplicationGatewayRewriteRuleSetRewriteRule {
    /**
     * @return One or more `condition` blocks as defined above.
     * 
     */
    private @Nullable List conditions;
    /**
     * @return Unique name of the rewrite rule block
     * 
     */
    private String name;
    /**
     * @return One or more `request_header_configuration` blocks as defined above.
     * 
     */
    private @Nullable List requestHeaderConfigurations;
    /**
     * @return One or more `response_header_configuration` blocks as defined above.
     * 
     */
    private @Nullable List responseHeaderConfigurations;
    /**
     * @return Rule sequence of the rewrite rule that determines the order of execution in a set.
     * 
     */
    private Integer ruleSequence;
    /**
     * @return One `url` block as defined below
     * 
     */
    private @Nullable ApplicationGatewayRewriteRuleSetRewriteRuleUrl url;

    private ApplicationGatewayRewriteRuleSetRewriteRule() {}
    /**
     * @return One or more `condition` blocks as defined above.
     * 
     */
    public List conditions() {
        return this.conditions == null ? List.of() : this.conditions;
    }
    /**
     * @return Unique name of the rewrite rule block
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return One or more `request_header_configuration` blocks as defined above.
     * 
     */
    public List requestHeaderConfigurations() {
        return this.requestHeaderConfigurations == null ? List.of() : this.requestHeaderConfigurations;
    }
    /**
     * @return One or more `response_header_configuration` blocks as defined above.
     * 
     */
    public List responseHeaderConfigurations() {
        return this.responseHeaderConfigurations == null ? List.of() : this.responseHeaderConfigurations;
    }
    /**
     * @return Rule sequence of the rewrite rule that determines the order of execution in a set.
     * 
     */
    public Integer ruleSequence() {
        return this.ruleSequence;
    }
    /**
     * @return One `url` block as defined below
     * 
     */
    public Optional url() {
        return Optional.ofNullable(this.url);
    }

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

    public static Builder builder(ApplicationGatewayRewriteRuleSetRewriteRule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List conditions;
        private String name;
        private @Nullable List requestHeaderConfigurations;
        private @Nullable List responseHeaderConfigurations;
        private Integer ruleSequence;
        private @Nullable ApplicationGatewayRewriteRuleSetRewriteRuleUrl url;
        public Builder() {}
        public Builder(ApplicationGatewayRewriteRuleSetRewriteRule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.conditions = defaults.conditions;
    	      this.name = defaults.name;
    	      this.requestHeaderConfigurations = defaults.requestHeaderConfigurations;
    	      this.responseHeaderConfigurations = defaults.responseHeaderConfigurations;
    	      this.ruleSequence = defaults.ruleSequence;
    	      this.url = defaults.url;
        }

        @CustomType.Setter
        public Builder conditions(@Nullable List conditions) {

            this.conditions = conditions;
            return this;
        }
        public Builder conditions(ApplicationGatewayRewriteRuleSetRewriteRuleCondition... conditions) {
            return conditions(List.of(conditions));
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("ApplicationGatewayRewriteRuleSetRewriteRule", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder requestHeaderConfigurations(@Nullable List requestHeaderConfigurations) {

            this.requestHeaderConfigurations = requestHeaderConfigurations;
            return this;
        }
        public Builder requestHeaderConfigurations(ApplicationGatewayRewriteRuleSetRewriteRuleRequestHeaderConfiguration... requestHeaderConfigurations) {
            return requestHeaderConfigurations(List.of(requestHeaderConfigurations));
        }
        @CustomType.Setter
        public Builder responseHeaderConfigurations(@Nullable List responseHeaderConfigurations) {

            this.responseHeaderConfigurations = responseHeaderConfigurations;
            return this;
        }
        public Builder responseHeaderConfigurations(ApplicationGatewayRewriteRuleSetRewriteRuleResponseHeaderConfiguration... responseHeaderConfigurations) {
            return responseHeaderConfigurations(List.of(responseHeaderConfigurations));
        }
        @CustomType.Setter
        public Builder ruleSequence(Integer ruleSequence) {
            if (ruleSequence == null) {
              throw new MissingRequiredPropertyException("ApplicationGatewayRewriteRuleSetRewriteRule", "ruleSequence");
            }
            this.ruleSequence = ruleSequence;
            return this;
        }
        @CustomType.Setter
        public Builder url(@Nullable ApplicationGatewayRewriteRuleSetRewriteRuleUrl url) {

            this.url = url;
            return this;
        }
        public ApplicationGatewayRewriteRuleSetRewriteRule build() {
            final var _resultValue = new ApplicationGatewayRewriteRuleSetRewriteRule();
            _resultValue.conditions = conditions;
            _resultValue.name = name;
            _resultValue.requestHeaderConfigurations = requestHeaderConfigurations;
            _resultValue.responseHeaderConfigurations = responseHeaderConfigurations;
            _resultValue.ruleSequence = ruleSequence;
            _resultValue.url = url;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy