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

com.pulumi.digitalocean.inputs.AppSpecIngressRuleArgs Maven / Gradle / Ivy

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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.inputs.AppSpecIngressRuleComponentArgs;
import com.pulumi.digitalocean.inputs.AppSpecIngressRuleCorsArgs;
import com.pulumi.digitalocean.inputs.AppSpecIngressRuleMatchArgs;
import com.pulumi.digitalocean.inputs.AppSpecIngressRuleRedirectArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AppSpecIngressRuleArgs Empty = new AppSpecIngressRuleArgs();

    /**
     * The component to route to. Only one of `component` or `redirect` may be set.
     * 
     */
    @Import(name="component")
    private @Nullable Output component;

    /**
     * @return The component to route to. Only one of `component` or `redirect` may be set.
     * 
     */
    public Optional> component() {
        return Optional.ofNullable(this.component);
    }

    /**
     * The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
     * 
     */
    @Import(name="cors")
    private @Nullable Output cors;

    /**
     * @return The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
     * 
     */
    public Optional> cors() {
        return Optional.ofNullable(this.cors);
    }

    /**
     * The match configuration for the rule
     * 
     */
    @Import(name="match")
    private @Nullable Output match;

    /**
     * @return The match configuration for the rule
     * 
     */
    public Optional> match() {
        return Optional.ofNullable(this.match);
    }

    /**
     * The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
     * 
     */
    @Import(name="redirect")
    private @Nullable Output redirect;

    /**
     * @return The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
     * 
     */
    public Optional> redirect() {
        return Optional.ofNullable(this.redirect);
    }

    private AppSpecIngressRuleArgs() {}

    private AppSpecIngressRuleArgs(AppSpecIngressRuleArgs $) {
        this.component = $.component;
        this.cors = $.cors;
        this.match = $.match;
        this.redirect = $.redirect;
    }

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

    public static final class Builder {
        private AppSpecIngressRuleArgs $;

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

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

        /**
         * @param component The component to route to. Only one of `component` or `redirect` may be set.
         * 
         * @return builder
         * 
         */
        public Builder component(@Nullable Output component) {
            $.component = component;
            return this;
        }

        /**
         * @param component The component to route to. Only one of `component` or `redirect` may be set.
         * 
         * @return builder
         * 
         */
        public Builder component(AppSpecIngressRuleComponentArgs component) {
            return component(Output.of(component));
        }

        /**
         * @param cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
         * 
         * @return builder
         * 
         */
        public Builder cors(@Nullable Output cors) {
            $.cors = cors;
            return this;
        }

        /**
         * @param cors The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
         * 
         * @return builder
         * 
         */
        public Builder cors(AppSpecIngressRuleCorsArgs cors) {
            return cors(Output.of(cors));
        }

        /**
         * @param match The match configuration for the rule
         * 
         * @return builder
         * 
         */
        public Builder match(@Nullable Output match) {
            $.match = match;
            return this;
        }

        /**
         * @param match The match configuration for the rule
         * 
         * @return builder
         * 
         */
        public Builder match(AppSpecIngressRuleMatchArgs match) {
            return match(Output.of(match));
        }

        /**
         * @param redirect The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
         * 
         * @return builder
         * 
         */
        public Builder redirect(@Nullable Output redirect) {
            $.redirect = redirect;
            return this;
        }

        /**
         * @param redirect The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
         * 
         * @return builder
         * 
         */
        public Builder redirect(AppSpecIngressRuleRedirectArgs redirect) {
            return redirect(Output.of(redirect));
        }

        public AppSpecIngressRuleArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy