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

com.pulumi.azurenative.m365securityandcompliance.outputs.ServiceCorsConfigurationInfoResponse Maven / Gradle / Ivy

There is a newer version: 2.72.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.azurenative.m365securityandcompliance.outputs;

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

@CustomType
public final class ServiceCorsConfigurationInfoResponse {
    /**
     * @return If credentials are allowed via CORS.
     * 
     */
    private @Nullable Boolean allowCredentials;
    /**
     * @return The headers to be allowed via CORS.
     * 
     */
    private @Nullable List headers;
    /**
     * @return The max age to be allowed via CORS.
     * 
     */
    private @Nullable Double maxAge;
    /**
     * @return The methods to be allowed via CORS.
     * 
     */
    private @Nullable List methods;
    /**
     * @return The origins to be allowed via CORS.
     * 
     */
    private @Nullable List origins;

    private ServiceCorsConfigurationInfoResponse() {}
    /**
     * @return If credentials are allowed via CORS.
     * 
     */
    public Optional allowCredentials() {
        return Optional.ofNullable(this.allowCredentials);
    }
    /**
     * @return The headers to be allowed via CORS.
     * 
     */
    public List headers() {
        return this.headers == null ? List.of() : this.headers;
    }
    /**
     * @return The max age to be allowed via CORS.
     * 
     */
    public Optional maxAge() {
        return Optional.ofNullable(this.maxAge);
    }
    /**
     * @return The methods to be allowed via CORS.
     * 
     */
    public List methods() {
        return this.methods == null ? List.of() : this.methods;
    }
    /**
     * @return The origins to be allowed via CORS.
     * 
     */
    public List origins() {
        return this.origins == null ? List.of() : this.origins;
    }

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

    public static Builder builder(ServiceCorsConfigurationInfoResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean allowCredentials;
        private @Nullable List headers;
        private @Nullable Double maxAge;
        private @Nullable List methods;
        private @Nullable List origins;
        public Builder() {}
        public Builder(ServiceCorsConfigurationInfoResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowCredentials = defaults.allowCredentials;
    	      this.headers = defaults.headers;
    	      this.maxAge = defaults.maxAge;
    	      this.methods = defaults.methods;
    	      this.origins = defaults.origins;
        }

        @CustomType.Setter
        public Builder allowCredentials(@Nullable Boolean allowCredentials) {

            this.allowCredentials = allowCredentials;
            return this;
        }
        @CustomType.Setter
        public Builder headers(@Nullable List headers) {

            this.headers = headers;
            return this;
        }
        public Builder headers(String... headers) {
            return headers(List.of(headers));
        }
        @CustomType.Setter
        public Builder maxAge(@Nullable Double maxAge) {

            this.maxAge = maxAge;
            return this;
        }
        @CustomType.Setter
        public Builder methods(@Nullable List methods) {

            this.methods = methods;
            return this;
        }
        public Builder methods(String... methods) {
            return methods(List.of(methods));
        }
        @CustomType.Setter
        public Builder origins(@Nullable List origins) {

            this.origins = origins;
            return this;
        }
        public Builder origins(String... origins) {
            return origins(List.of(origins));
        }
        public ServiceCorsConfigurationInfoResponse build() {
            final var _resultValue = new ServiceCorsConfigurationInfoResponse();
            _resultValue.allowCredentials = allowCredentials;
            _resultValue.headers = headers;
            _resultValue.maxAge = maxAge;
            _resultValue.methods = methods;
            _resultValue.origins = origins;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy