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

com.pulumi.keycloak.saml.ScriptProtocolMapperArgs Maven / Gradle / Ivy

The 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.keycloak.saml;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ScriptProtocolMapperArgs Empty = new ScriptProtocolMapperArgs();

    /**
     * The client this protocol mapper should be attached to. Conflicts with `client_scope_id`. One of `client_id` or `client_scope_id` must be specified.
     * 
     */
    @Import(name="clientId")
    private @Nullable Output clientId;

    /**
     * @return The client this protocol mapper should be attached to. Conflicts with `client_scope_id`. One of `client_id` or `client_scope_id` must be specified.
     * 
     */
    public Optional> clientId() {
        return Optional.ofNullable(this.clientId);
    }

    /**
     * The client scope this protocol mapper should be attached to. Conflicts with `client_id`. One of `client_id` or `client_scope_id` must be specified.
     * 
     */
    @Import(name="clientScopeId")
    private @Nullable Output clientScopeId;

    /**
     * @return The client scope this protocol mapper should be attached to. Conflicts with `client_id`. One of `client_id` or `client_scope_id` must be specified.
     * 
     */
    public Optional> clientScopeId() {
        return Optional.ofNullable(this.clientScopeId);
    }

    /**
     * An optional human-friendly name for this attribute.
     * 
     */
    @Import(name="friendlyName")
    private @Nullable Output friendlyName;

    /**
     * @return An optional human-friendly name for this attribute.
     * 
     */
    public Optional> friendlyName() {
        return Optional.ofNullable(this.friendlyName);
    }

    /**
     * The display name of this protocol mapper in the GUI.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The display name of this protocol mapper in the GUI.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The realm this protocol mapper exists within.
     * 
     */
    @Import(name="realmId", required=true)
    private Output realmId;

    /**
     * @return The realm this protocol mapper exists within.
     * 
     */
    public Output realmId() {
        return this.realmId;
    }

    /**
     * The name of the SAML attribute.
     * 
     */
    @Import(name="samlAttributeName", required=true)
    private Output samlAttributeName;

    /**
     * @return The name of the SAML attribute.
     * 
     */
    public Output samlAttributeName() {
        return this.samlAttributeName;
    }

    /**
     * The SAML attribute Name Format. Can be one of `Unspecified`, `Basic`, or `URI Reference`.
     * 
     */
    @Import(name="samlAttributeNameFormat", required=true)
    private Output samlAttributeNameFormat;

    /**
     * @return The SAML attribute Name Format. Can be one of `Unspecified`, `Basic`, or `URI Reference`.
     * 
     */
    public Output samlAttributeNameFormat() {
        return this.samlAttributeNameFormat;
    }

    /**
     * JavaScript code to compute the attribute value.
     * 
     */
    @Import(name="script", required=true)
    private Output script;

    /**
     * @return JavaScript code to compute the attribute value.
     * 
     */
    public Output script() {
        return this.script;
    }

    /**
     * When `true`, all values will be stored under one attribute with multiple attribute values. Defaults to `true`.
     * 
     */
    @Import(name="singleValueAttribute")
    private @Nullable Output singleValueAttribute;

    /**
     * @return When `true`, all values will be stored under one attribute with multiple attribute values. Defaults to `true`.
     * 
     */
    public Optional> singleValueAttribute() {
        return Optional.ofNullable(this.singleValueAttribute);
    }

    private ScriptProtocolMapperArgs() {}

    private ScriptProtocolMapperArgs(ScriptProtocolMapperArgs $) {
        this.clientId = $.clientId;
        this.clientScopeId = $.clientScopeId;
        this.friendlyName = $.friendlyName;
        this.name = $.name;
        this.realmId = $.realmId;
        this.samlAttributeName = $.samlAttributeName;
        this.samlAttributeNameFormat = $.samlAttributeNameFormat;
        this.script = $.script;
        this.singleValueAttribute = $.singleValueAttribute;
    }

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

    public static final class Builder {
        private ScriptProtocolMapperArgs $;

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

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

        /**
         * @param clientId The client this protocol mapper should be attached to. Conflicts with `client_scope_id`. One of `client_id` or `client_scope_id` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder clientId(@Nullable Output clientId) {
            $.clientId = clientId;
            return this;
        }

        /**
         * @param clientId The client this protocol mapper should be attached to. Conflicts with `client_scope_id`. One of `client_id` or `client_scope_id` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder clientId(String clientId) {
            return clientId(Output.of(clientId));
        }

        /**
         * @param clientScopeId The client scope this protocol mapper should be attached to. Conflicts with `client_id`. One of `client_id` or `client_scope_id` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder clientScopeId(@Nullable Output clientScopeId) {
            $.clientScopeId = clientScopeId;
            return this;
        }

        /**
         * @param clientScopeId The client scope this protocol mapper should be attached to. Conflicts with `client_id`. One of `client_id` or `client_scope_id` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder clientScopeId(String clientScopeId) {
            return clientScopeId(Output.of(clientScopeId));
        }

        /**
         * @param friendlyName An optional human-friendly name for this attribute.
         * 
         * @return builder
         * 
         */
        public Builder friendlyName(@Nullable Output friendlyName) {
            $.friendlyName = friendlyName;
            return this;
        }

        /**
         * @param friendlyName An optional human-friendly name for this attribute.
         * 
         * @return builder
         * 
         */
        public Builder friendlyName(String friendlyName) {
            return friendlyName(Output.of(friendlyName));
        }

        /**
         * @param name The display name of this protocol mapper in the GUI.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The display name of this protocol mapper in the GUI.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param realmId The realm this protocol mapper exists within.
         * 
         * @return builder
         * 
         */
        public Builder realmId(Output realmId) {
            $.realmId = realmId;
            return this;
        }

        /**
         * @param realmId The realm this protocol mapper exists within.
         * 
         * @return builder
         * 
         */
        public Builder realmId(String realmId) {
            return realmId(Output.of(realmId));
        }

        /**
         * @param samlAttributeName The name of the SAML attribute.
         * 
         * @return builder
         * 
         */
        public Builder samlAttributeName(Output samlAttributeName) {
            $.samlAttributeName = samlAttributeName;
            return this;
        }

        /**
         * @param samlAttributeName The name of the SAML attribute.
         * 
         * @return builder
         * 
         */
        public Builder samlAttributeName(String samlAttributeName) {
            return samlAttributeName(Output.of(samlAttributeName));
        }

        /**
         * @param samlAttributeNameFormat The SAML attribute Name Format. Can be one of `Unspecified`, `Basic`, or `URI Reference`.
         * 
         * @return builder
         * 
         */
        public Builder samlAttributeNameFormat(Output samlAttributeNameFormat) {
            $.samlAttributeNameFormat = samlAttributeNameFormat;
            return this;
        }

        /**
         * @param samlAttributeNameFormat The SAML attribute Name Format. Can be one of `Unspecified`, `Basic`, or `URI Reference`.
         * 
         * @return builder
         * 
         */
        public Builder samlAttributeNameFormat(String samlAttributeNameFormat) {
            return samlAttributeNameFormat(Output.of(samlAttributeNameFormat));
        }

        /**
         * @param script JavaScript code to compute the attribute value.
         * 
         * @return builder
         * 
         */
        public Builder script(Output script) {
            $.script = script;
            return this;
        }

        /**
         * @param script JavaScript code to compute the attribute value.
         * 
         * @return builder
         * 
         */
        public Builder script(String script) {
            return script(Output.of(script));
        }

        /**
         * @param singleValueAttribute When `true`, all values will be stored under one attribute with multiple attribute values. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder singleValueAttribute(@Nullable Output singleValueAttribute) {
            $.singleValueAttribute = singleValueAttribute;
            return this;
        }

        /**
         * @param singleValueAttribute When `true`, all values will be stored under one attribute with multiple attribute values. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder singleValueAttribute(Boolean singleValueAttribute) {
            return singleValueAttribute(Output.of(singleValueAttribute));
        }

        public ScriptProtocolMapperArgs build() {
            if ($.realmId == null) {
                throw new MissingRequiredPropertyException("ScriptProtocolMapperArgs", "realmId");
            }
            if ($.samlAttributeName == null) {
                throw new MissingRequiredPropertyException("ScriptProtocolMapperArgs", "samlAttributeName");
            }
            if ($.samlAttributeNameFormat == null) {
                throw new MissingRequiredPropertyException("ScriptProtocolMapperArgs", "samlAttributeNameFormat");
            }
            if ($.script == null) {
                throw new MissingRequiredPropertyException("ScriptProtocolMapperArgs", "script");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy