// *** 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.appplatform;

import com.pulumi.azure.appplatform.inputs.SpringCloudGatewayRouteConfigOpenApiArgs;
import com.pulumi.azure.appplatform.inputs.SpringCloudGatewayRouteConfigRouteArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SpringCloudGatewayRouteConfigArgs Empty = new SpringCloudGatewayRouteConfigArgs();

    /**
     * Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
     * 
     */
    @Import(name="filters")
    private @Nullable Output<List<String>> filters;

    /**
     * @return Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
     * 
     */
    public Optional<Output<List<String>>> filters() {
        return Optional.ofNullable(this.filters);
    }

    /**
     * The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * One or more `open_api` blocks as defined below.
     * 
     */
    @Import(name="openApi")
    private @Nullable Output<SpringCloudGatewayRouteConfigOpenApiArgs> openApi;

    /**
     * @return One or more `open_api` blocks as defined below.
     * 
     */
    public Optional<Output<SpringCloudGatewayRouteConfigOpenApiArgs>> openApi() {
        return Optional.ofNullable(this.openApi);
    }

    /**
     * Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     * 
     */
    @Import(name="predicates")
    private @Nullable Output<List<String>> predicates;

    /**
     * @return Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     * 
     */
    public Optional<Output<List<String>>> predicates() {
        return Optional.ofNullable(this.predicates);
    }

    /**
     * Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`.
     * 
     * &gt; **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
     * 
     */
    @Import(name="protocol")
    private @Nullable Output<String> protocol;

    /**
     * @return Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`.
     * 
     * &gt; **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
     * 
     */
    public Optional<Output<String>> protocol() {
        return Optional.ofNullable(this.protocol);
    }

    /**
     * One or more `route` blocks as defined below.
     * 
     */
    @Import(name="routes")
    private @Nullable Output<List<SpringCloudGatewayRouteConfigRouteArgs>> routes;

    /**
     * @return One or more `route` blocks as defined below.
     * 
     */
    public Optional<Output<List<SpringCloudGatewayRouteConfigRouteArgs>>> routes() {
        return Optional.ofNullable(this.routes);
    }

    /**
     * The ID of the Spring Cloud App.
     * 
     */
    @Import(name="springCloudAppId")
    private @Nullable Output<String> springCloudAppId;

    /**
     * @return The ID of the Spring Cloud App.
     * 
     */
    public Optional<Output<String>> springCloudAppId() {
        return Optional.ofNullable(this.springCloudAppId);
    }

    /**
     * The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
     * 
     */
    @Import(name="springCloudGatewayId", required=true)
    private Output<String> springCloudGatewayId;

    /**
     * @return The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
     * 
     */
    public Output<String> springCloudGatewayId() {
        return this.springCloudGatewayId;
    }

    /**
     * Should the sso validation be enabled in app level?
     * 
     */
    @Import(name="ssoValidationEnabled")
    private @Nullable Output<Boolean> ssoValidationEnabled;

    /**
     * @return Should the sso validation be enabled in app level?
     * 
     */
    public Optional<Output<Boolean>> ssoValidationEnabled() {
        return Optional.ofNullable(this.ssoValidationEnabled);
    }

    private SpringCloudGatewayRouteConfigArgs() {}

    private SpringCloudGatewayRouteConfigArgs(SpringCloudGatewayRouteConfigArgs $) {
        this.filters = $.filters;
        this.name = $.name;
        this.openApi = $.openApi;
        this.predicates = $.predicates;
        this.protocol = $.protocol;
        this.routes = $.routes;
        this.springCloudAppId = $.springCloudAppId;
        this.springCloudGatewayId = $.springCloudGatewayId;
        this.ssoValidationEnabled = $.ssoValidationEnabled;
    }

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

    public static final class Builder {
        private SpringCloudGatewayRouteConfigArgs $;

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

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

        /**
         * @param filters Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
         * 
         * @return builder
         * 
         */
        public Builder filters(@Nullable Output<List<String>> filters) {
            $.filters = filters;
            return this;
        }

        /**
         * @param filters Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
         * 
         * @return builder
         * 
         */
        public Builder filters(List<String> filters) {
            return filters(Output.of(filters));
        }

        /**
         * @param filters Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
         * 
         * @return builder
         * 
         */
        public Builder filters(String... filters) {
            return filters(List.of(filters));
        }

        /**
         * @param name The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param openApi One or more `open_api` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder openApi(@Nullable Output<SpringCloudGatewayRouteConfigOpenApiArgs> openApi) {
            $.openApi = openApi;
            return this;
        }

        /**
         * @param openApi One or more `open_api` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder openApi(SpringCloudGatewayRouteConfigOpenApiArgs openApi) {
            return openApi(Output.of(openApi));
        }

        /**
         * @param predicates Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
         * 
         * @return builder
         * 
         */
        public Builder predicates(@Nullable Output<List<String>> predicates) {
            $.predicates = predicates;
            return this;
        }

        /**
         * @param predicates Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
         * 
         * @return builder
         * 
         */
        public Builder predicates(List<String> predicates) {
            return predicates(Output.of(predicates));
        }

        /**
         * @param predicates Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
         * 
         * @return builder
         * 
         */
        public Builder predicates(String... predicates) {
            return predicates(List.of(predicates));
        }

        /**
         * @param protocol Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`.
         * 
         * &gt; **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output<String> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`. Defaults to `HTTP`.
         * 
         * &gt; **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param routes One or more `route` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder routes(@Nullable Output<List<SpringCloudGatewayRouteConfigRouteArgs>> routes) {
            $.routes = routes;
            return this;
        }

        /**
         * @param routes One or more `route` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder routes(List<SpringCloudGatewayRouteConfigRouteArgs> routes) {
            return routes(Output.of(routes));
        }

        /**
         * @param routes One or more `route` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder routes(SpringCloudGatewayRouteConfigRouteArgs... routes) {
            return routes(List.of(routes));
        }

        /**
         * @param springCloudAppId The ID of the Spring Cloud App.
         * 
         * @return builder
         * 
         */
        public Builder springCloudAppId(@Nullable Output<String> springCloudAppId) {
            $.springCloudAppId = springCloudAppId;
            return this;
        }

        /**
         * @param springCloudAppId The ID of the Spring Cloud App.
         * 
         * @return builder
         * 
         */
        public Builder springCloudAppId(String springCloudAppId) {
            return springCloudAppId(Output.of(springCloudAppId));
        }

        /**
         * @param springCloudGatewayId The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
         * 
         * @return builder
         * 
         */
        public Builder springCloudGatewayId(Output<String> springCloudGatewayId) {
            $.springCloudGatewayId = springCloudGatewayId;
            return this;
        }

        /**
         * @param springCloudGatewayId The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
         * 
         * @return builder
         * 
         */
        public Builder springCloudGatewayId(String springCloudGatewayId) {
            return springCloudGatewayId(Output.of(springCloudGatewayId));
        }

        /**
         * @param ssoValidationEnabled Should the sso validation be enabled in app level?
         * 
         * @return builder
         * 
         */
        public Builder ssoValidationEnabled(@Nullable Output<Boolean> ssoValidationEnabled) {
            $.ssoValidationEnabled = ssoValidationEnabled;
            return this;
        }

        /**
         * @param ssoValidationEnabled Should the sso validation be enabled in app level?
         * 
         * @return builder
         * 
         */
        public Builder ssoValidationEnabled(Boolean ssoValidationEnabled) {
            return ssoValidationEnabled(Output.of(ssoValidationEnabled));
        }

        public SpringCloudGatewayRouteConfigArgs build() {
            $.springCloudGatewayId = Objects.requireNonNull($.springCloudGatewayId, "expected parameter 'springCloudGatewayId' to be non-null");
            return $;
        }
    }

}
