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

com.pulumi.alicloud.ga.ForwardingRuleArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.ga;

import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleActionArgs;
import com.pulumi.alicloud.ga.inputs.ForwardingRuleRuleConditionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


public final class ForwardingRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final ForwardingRuleArgs Empty = new ForwardingRuleArgs();

    /**
     * The ID of the Global Accelerator instance.
     * 
     */
    @Import(name="acceleratorId", required=true)
    private Output acceleratorId;

    /**
     * @return The ID of the Global Accelerator instance.
     * 
     */
    public Output acceleratorId() {
        return this.acceleratorId;
    }

    /**
     * Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
     * 
     */
    @Import(name="forwardingRuleName")
    private @Nullable Output forwardingRuleName;

    /**
     * @return Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
     * 
     */
    public Optional> forwardingRuleName() {
        return Optional.ofNullable(this.forwardingRuleName);
    }

    /**
     * The ID of the listener.
     * 
     */
    @Import(name="listenerId", required=true)
    private Output listenerId;

    /**
     * @return The ID of the listener.
     * 
     */
    public Output listenerId() {
        return this.listenerId;
    }

    /**
     * Forwarding policy priority.
     * 
     */
    @Import(name="priority")
    private @Nullable Output priority;

    /**
     * @return Forwarding policy priority.
     * 
     */
    public Optional> priority() {
        return Optional.ofNullable(this.priority);
    }

    /**
     * Forward action. See `rule_actions` below.
     * 
     */
    @Import(name="ruleActions", required=true)
    private Output> ruleActions;

    /**
     * @return Forward action. See `rule_actions` below.
     * 
     */
    public Output> ruleActions() {
        return this.ruleActions;
    }

    /**
     * Forwarding condition list. See `rule_conditions` below.
     * 
     */
    @Import(name="ruleConditions", required=true)
    private Output> ruleConditions;

    /**
     * @return Forwarding condition list. See `rule_conditions` below.
     * 
     */
    public Output> ruleConditions() {
        return this.ruleConditions;
    }

    private ForwardingRuleArgs() {}

    private ForwardingRuleArgs(ForwardingRuleArgs $) {
        this.acceleratorId = $.acceleratorId;
        this.forwardingRuleName = $.forwardingRuleName;
        this.listenerId = $.listenerId;
        this.priority = $.priority;
        this.ruleActions = $.ruleActions;
        this.ruleConditions = $.ruleConditions;
    }

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

    public static final class Builder {
        private ForwardingRuleArgs $;

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

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

        /**
         * @param acceleratorId The ID of the Global Accelerator instance.
         * 
         * @return builder
         * 
         */
        public Builder acceleratorId(Output acceleratorId) {
            $.acceleratorId = acceleratorId;
            return this;
        }

        /**
         * @param acceleratorId The ID of the Global Accelerator instance.
         * 
         * @return builder
         * 
         */
        public Builder acceleratorId(String acceleratorId) {
            return acceleratorId(Output.of(acceleratorId));
        }

        /**
         * @param forwardingRuleName Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleName(@Nullable Output forwardingRuleName) {
            $.forwardingRuleName = forwardingRuleName;
            return this;
        }

        /**
         * @param forwardingRuleName Forwarding policy name. The length of the name is 2-128 English or Chinese characters. It must start with uppercase and lowercase letters or Chinese characters. It can contain numbers, half width period (.), underscores (_) And dash (-).
         * 
         * @return builder
         * 
         */
        public Builder forwardingRuleName(String forwardingRuleName) {
            return forwardingRuleName(Output.of(forwardingRuleName));
        }

        /**
         * @param listenerId The ID of the listener.
         * 
         * @return builder
         * 
         */
        public Builder listenerId(Output listenerId) {
            $.listenerId = listenerId;
            return this;
        }

        /**
         * @param listenerId The ID of the listener.
         * 
         * @return builder
         * 
         */
        public Builder listenerId(String listenerId) {
            return listenerId(Output.of(listenerId));
        }

        /**
         * @param priority Forwarding policy priority.
         * 
         * @return builder
         * 
         */
        public Builder priority(@Nullable Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority Forwarding policy priority.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param ruleActions Forward action. See `rule_actions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleActions(Output> ruleActions) {
            $.ruleActions = ruleActions;
            return this;
        }

        /**
         * @param ruleActions Forward action. See `rule_actions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleActions(List ruleActions) {
            return ruleActions(Output.of(ruleActions));
        }

        /**
         * @param ruleActions Forward action. See `rule_actions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleActions(ForwardingRuleRuleActionArgs... ruleActions) {
            return ruleActions(List.of(ruleActions));
        }

        /**
         * @param ruleConditions Forwarding condition list. See `rule_conditions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleConditions(Output> ruleConditions) {
            $.ruleConditions = ruleConditions;
            return this;
        }

        /**
         * @param ruleConditions Forwarding condition list. See `rule_conditions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleConditions(List ruleConditions) {
            return ruleConditions(Output.of(ruleConditions));
        }

        /**
         * @param ruleConditions Forwarding condition list. See `rule_conditions` below.
         * 
         * @return builder
         * 
         */
        public Builder ruleConditions(ForwardingRuleRuleConditionArgs... ruleConditions) {
            return ruleConditions(List.of(ruleConditions));
        }

        public ForwardingRuleArgs build() {
            if ($.acceleratorId == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "acceleratorId");
            }
            if ($.listenerId == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "listenerId");
            }
            if ($.ruleActions == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "ruleActions");
            }
            if ($.ruleConditions == null) {
                throw new MissingRequiredPropertyException("ForwardingRuleArgs", "ruleConditions");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy