// *** 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.gcp.identityplatform.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.identityplatform.outputs.ConfigBlockingFunctionsForwardInboundCredentials;
import com.pulumi.gcp.identityplatform.outputs.ConfigBlockingFunctionsTrigger;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ConfigBlockingFunctions {
    /**
     * @return The user credentials to include in the JWT payload that is sent to the registered Blocking Functions.
     * Structure is documented below.
     * 
     */
    private @Nullable ConfigBlockingFunctionsForwardInboundCredentials forwardInboundCredentials;
    /**
     * @return Map of Trigger to event type. Key should be one of the supported event types: &#34;beforeCreate&#34;, &#34;beforeSignIn&#34;.
     * Structure is documented below.
     * 
     */
    private List<ConfigBlockingFunctionsTrigger> triggers;

    private ConfigBlockingFunctions() {}
    /**
     * @return The user credentials to include in the JWT payload that is sent to the registered Blocking Functions.
     * Structure is documented below.
     * 
     */
    public Optional<ConfigBlockingFunctionsForwardInboundCredentials> forwardInboundCredentials() {
        return Optional.ofNullable(this.forwardInboundCredentials);
    }
    /**
     * @return Map of Trigger to event type. Key should be one of the supported event types: &#34;beforeCreate&#34;, &#34;beforeSignIn&#34;.
     * Structure is documented below.
     * 
     */
    public List<ConfigBlockingFunctionsTrigger> triggers() {
        return this.triggers;
    }

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

    public static Builder builder(ConfigBlockingFunctions defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ConfigBlockingFunctionsForwardInboundCredentials forwardInboundCredentials;
        private List<ConfigBlockingFunctionsTrigger> triggers;
        public Builder() {}
        public Builder(ConfigBlockingFunctions defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.forwardInboundCredentials = defaults.forwardInboundCredentials;
    	      this.triggers = defaults.triggers;
        }

        @CustomType.Setter
        public Builder forwardInboundCredentials(@Nullable ConfigBlockingFunctionsForwardInboundCredentials forwardInboundCredentials) {
            this.forwardInboundCredentials = forwardInboundCredentials;
            return this;
        }
        @CustomType.Setter
        public Builder triggers(List<ConfigBlockingFunctionsTrigger> triggers) {
            this.triggers = Objects.requireNonNull(triggers);
            return this;
        }
        public Builder triggers(ConfigBlockingFunctionsTrigger... triggers) {
            return triggers(List.of(triggers));
        }
        public ConfigBlockingFunctions build() {
            final var o = new ConfigBlockingFunctions();
            o.forwardInboundCredentials = forwardInboundCredentials;
            o.triggers = triggers;
            return o;
        }
    }
}
