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

com.pulumi.digitalocean.inputs.AppSpecServiceCorsArgs 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.AppSpecServiceCorsAllowOriginsArgs;
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 AppSpecServiceCorsArgs extends com.pulumi.resources.ResourceArgs {

    public static final AppSpecServiceCorsArgs Empty = new AppSpecServiceCorsArgs();

    /**
     * Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header.
     * 
     */
    @Import(name="allowCredentials")
    private @Nullable Output allowCredentials;

    /**
     * @return Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header.
     * 
     */
    public Optional> allowCredentials() {
        return Optional.ofNullable(this.allowCredentials);
    }

    /**
     * The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
     * 
     */
    @Import(name="allowHeaders")
    private @Nullable Output> allowHeaders;

    /**
     * @return The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
     * 
     */
    public Optional>> allowHeaders() {
        return Optional.ofNullable(this.allowHeaders);
    }

    /**
     * The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
     * 
     */
    @Import(name="allowMethods")
    private @Nullable Output> allowMethods;

    /**
     * @return The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
     * 
     */
    public Optional>> allowMethods() {
        return Optional.ofNullable(this.allowMethods);
    }

    /**
     * The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header.
     * 
     */
    @Import(name="allowOrigins")
    private @Nullable Output allowOrigins;

    /**
     * @return The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header.
     * 
     */
    public Optional> allowOrigins() {
        return Optional.ofNullable(this.allowOrigins);
    }

    /**
     * The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
     * 
     */
    @Import(name="exposeHeaders")
    private @Nullable Output> exposeHeaders;

    /**
     * @return The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
     * 
     */
    public Optional>> exposeHeaders() {
        return Optional.ofNullable(this.exposeHeaders);
    }

    /**
     * An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example: `5h30m`.
     * 
     */
    @Import(name="maxAge")
    private @Nullable Output maxAge;

    /**
     * @return An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example: `5h30m`.
     * 
     */
    public Optional> maxAge() {
        return Optional.ofNullable(this.maxAge);
    }

    private AppSpecServiceCorsArgs() {}

    private AppSpecServiceCorsArgs(AppSpecServiceCorsArgs $) {
        this.allowCredentials = $.allowCredentials;
        this.allowHeaders = $.allowHeaders;
        this.allowMethods = $.allowMethods;
        this.allowOrigins = $.allowOrigins;
        this.exposeHeaders = $.exposeHeaders;
        this.maxAge = $.maxAge;
    }

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

    public static final class Builder {
        private AppSpecServiceCorsArgs $;

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

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

        /**
         * @param allowCredentials Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header.
         * 
         * @return builder
         * 
         */
        public Builder allowCredentials(@Nullable Output allowCredentials) {
            $.allowCredentials = allowCredentials;
            return this;
        }

        /**
         * @param allowCredentials Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header.
         * 
         * @return builder
         * 
         */
        public Builder allowCredentials(Boolean allowCredentials) {
            return allowCredentials(Output.of(allowCredentials));
        }

        /**
         * @param allowHeaders The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder allowHeaders(@Nullable Output> allowHeaders) {
            $.allowHeaders = allowHeaders;
            return this;
        }

        /**
         * @param allowHeaders The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder allowHeaders(List allowHeaders) {
            return allowHeaders(Output.of(allowHeaders));
        }

        /**
         * @param allowHeaders The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder allowHeaders(String... allowHeaders) {
            return allowHeaders(List.of(allowHeaders));
        }

        /**
         * @param allowMethods The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
         * 
         * @return builder
         * 
         */
        public Builder allowMethods(@Nullable Output> allowMethods) {
            $.allowMethods = allowMethods;
            return this;
        }

        /**
         * @param allowMethods The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
         * 
         * @return builder
         * 
         */
        public Builder allowMethods(List allowMethods) {
            return allowMethods(Output.of(allowMethods));
        }

        /**
         * @param allowMethods The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
         * 
         * @return builder
         * 
         */
        public Builder allowMethods(String... allowMethods) {
            return allowMethods(List.of(allowMethods));
        }

        /**
         * @param allowOrigins The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header.
         * 
         * @return builder
         * 
         */
        public Builder allowOrigins(@Nullable Output allowOrigins) {
            $.allowOrigins = allowOrigins;
            return this;
        }

        /**
         * @param allowOrigins The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header.
         * 
         * @return builder
         * 
         */
        public Builder allowOrigins(AppSpecServiceCorsAllowOriginsArgs allowOrigins) {
            return allowOrigins(Output.of(allowOrigins));
        }

        /**
         * @param exposeHeaders The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder exposeHeaders(@Nullable Output> exposeHeaders) {
            $.exposeHeaders = exposeHeaders;
            return this;
        }

        /**
         * @param exposeHeaders The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder exposeHeaders(List exposeHeaders) {
            return exposeHeaders(Output.of(exposeHeaders));
        }

        /**
         * @param exposeHeaders The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
         * 
         * @return builder
         * 
         */
        public Builder exposeHeaders(String... exposeHeaders) {
            return exposeHeaders(List.of(exposeHeaders));
        }

        /**
         * @param maxAge An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example: `5h30m`.
         * 
         * @return builder
         * 
         */
        public Builder maxAge(@Nullable Output maxAge) {
            $.maxAge = maxAge;
            return this;
        }

        /**
         * @param maxAge An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example: `5h30m`.
         * 
         * @return builder
         * 
         */
        public Builder maxAge(String maxAge) {
            return maxAge(Output.of(maxAge));
        }

        public AppSpecServiceCorsArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy