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

com.pulumi.digitalocean.outputs.GetAppSpecFunctionCorsAllowOrigins 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.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetAppSpecFunctionCorsAllowOrigins {
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin only if the client's origin exactly matches the value you provide.
     * 
     */
    private @Nullable String exact;
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin if the beginning of the client's origin matches the value you provide.
     * 
     * @deprecated
     * Prefix-based matching has been deprecated in favor of regex-based matching.
     * 
     */
    @Deprecated /* Prefix-based matching has been deprecated in favor of regex-based matching. */
    private @Nullable String prefix;
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin if the client’s origin matches the regex you provide, in [RE2 style syntax](https://github.com/google/re2/wiki/Syntax).
     * 
     */
    private @Nullable String regex;

    private GetAppSpecFunctionCorsAllowOrigins() {}
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin only if the client's origin exactly matches the value you provide.
     * 
     */
    public Optional exact() {
        return Optional.ofNullable(this.exact);
    }
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin if the beginning of the client's origin matches the value you provide.
     * 
     * @deprecated
     * Prefix-based matching has been deprecated in favor of regex-based matching.
     * 
     */
    @Deprecated /* Prefix-based matching has been deprecated in favor of regex-based matching. */
    public Optional prefix() {
        return Optional.ofNullable(this.prefix);
    }
    /**
     * @return The `Access-Control-Allow-Origin` header will be set to the client's origin if the client’s origin matches the regex you provide, in [RE2 style syntax](https://github.com/google/re2/wiki/Syntax).
     * 
     */
    public Optional regex() {
        return Optional.ofNullable(this.regex);
    }

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

    public static Builder builder(GetAppSpecFunctionCorsAllowOrigins defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String exact;
        private @Nullable String prefix;
        private @Nullable String regex;
        public Builder() {}
        public Builder(GetAppSpecFunctionCorsAllowOrigins defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.exact = defaults.exact;
    	      this.prefix = defaults.prefix;
    	      this.regex = defaults.regex;
        }

        @CustomType.Setter
        public Builder exact(@Nullable String exact) {

            this.exact = exact;
            return this;
        }
        @CustomType.Setter
        public Builder prefix(@Nullable String prefix) {

            this.prefix = prefix;
            return this;
        }
        @CustomType.Setter
        public Builder regex(@Nullable String regex) {

            this.regex = regex;
            return this;
        }
        public GetAppSpecFunctionCorsAllowOrigins build() {
            final var _resultValue = new GetAppSpecFunctionCorsAllowOrigins();
            _resultValue.exact = exact;
            _resultValue.prefix = prefix;
            _resultValue.regex = regex;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy