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

com.pulumi.keycloak.openid.UserAttributeProtocolMapperArgs 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.openid;

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 UserAttributeProtocolMapperArgs extends com.pulumi.resources.ResourceArgs {

    public static final UserAttributeProtocolMapperArgs Empty = new UserAttributeProtocolMapperArgs();

    /**
     * Indicates if the attribute should be added as a claim to the access token. Defaults to `true`.
     * 
     */
    @Import(name="addToAccessToken")
    private @Nullable Output addToAccessToken;

    /**
     * @return Indicates if the attribute should be added as a claim to the access token. Defaults to `true`.
     * 
     */
    public Optional> addToAccessToken() {
        return Optional.ofNullable(this.addToAccessToken);
    }

    /**
     * Indicates if the attribute should be added as a claim to the id token. Defaults to `true`.
     * 
     */
    @Import(name="addToIdToken")
    private @Nullable Output addToIdToken;

    /**
     * @return Indicates if the attribute should be added as a claim to the id token. Defaults to `true`.
     * 
     */
    public Optional> addToIdToken() {
        return Optional.ofNullable(this.addToIdToken);
    }

    /**
     * Indicates if the attribute should be added as a claim to the UserInfo response body. Defaults to `true`.
     * 
     */
    @Import(name="addToUserinfo")
    private @Nullable Output addToUserinfo;

    /**
     * @return Indicates if the attribute should be added as a claim to the UserInfo response body. Defaults to `true`.
     * 
     */
    public Optional> addToUserinfo() {
        return Optional.ofNullable(this.addToUserinfo);
    }

    /**
     * Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
     * 
     */
    @Import(name="aggregateAttributes")
    private @Nullable Output aggregateAttributes;

    /**
     * @return Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
     * 
     */
    public Optional> aggregateAttributes() {
        return Optional.ofNullable(this.aggregateAttributes);
    }

    /**
     * The name of the claim to insert into a token.
     * 
     */
    @Import(name="claimName", required=true)
    private Output claimName;

    /**
     * @return The name of the claim to insert into a token.
     * 
     */
    public Output claimName() {
        return this.claimName;
    }

    /**
     * The claim type used when serializing JSON tokens. Can be one of `String`, `JSON`, `long`, `int`, or `boolean`. Defaults to `String`.
     * 
     */
    @Import(name="claimValueType")
    private @Nullable Output claimValueType;

    /**
     * @return The claim type used when serializing JSON tokens. Can be one of `String`, `JSON`, `long`, `int`, or `boolean`. Defaults to `String`.
     * 
     */
    public Optional> claimValueType() {
        return Optional.ofNullable(this.claimValueType);
    }

    /**
     * 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);
    }

    /**
     * Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
     * 
     */
    @Import(name="multivalued")
    private @Nullable Output multivalued;

    /**
     * @return Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
     * 
     */
    public Optional> multivalued() {
        return Optional.ofNullable(this.multivalued);
    }

    /**
     * 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 custom user attribute to map a claim for.
     * 
     */
    @Import(name="userAttribute", required=true)
    private Output userAttribute;

    /**
     * @return The custom user attribute to map a claim for.
     * 
     */
    public Output userAttribute() {
        return this.userAttribute;
    }

    private UserAttributeProtocolMapperArgs() {}

    private UserAttributeProtocolMapperArgs(UserAttributeProtocolMapperArgs $) {
        this.addToAccessToken = $.addToAccessToken;
        this.addToIdToken = $.addToIdToken;
        this.addToUserinfo = $.addToUserinfo;
        this.aggregateAttributes = $.aggregateAttributes;
        this.claimName = $.claimName;
        this.claimValueType = $.claimValueType;
        this.clientId = $.clientId;
        this.clientScopeId = $.clientScopeId;
        this.multivalued = $.multivalued;
        this.name = $.name;
        this.realmId = $.realmId;
        this.userAttribute = $.userAttribute;
    }

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

    public static final class Builder {
        private UserAttributeProtocolMapperArgs $;

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

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

        /**
         * @param addToAccessToken Indicates if the attribute should be added as a claim to the access token. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToAccessToken(@Nullable Output addToAccessToken) {
            $.addToAccessToken = addToAccessToken;
            return this;
        }

        /**
         * @param addToAccessToken Indicates if the attribute should be added as a claim to the access token. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToAccessToken(Boolean addToAccessToken) {
            return addToAccessToken(Output.of(addToAccessToken));
        }

        /**
         * @param addToIdToken Indicates if the attribute should be added as a claim to the id token. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToIdToken(@Nullable Output addToIdToken) {
            $.addToIdToken = addToIdToken;
            return this;
        }

        /**
         * @param addToIdToken Indicates if the attribute should be added as a claim to the id token. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToIdToken(Boolean addToIdToken) {
            return addToIdToken(Output.of(addToIdToken));
        }

        /**
         * @param addToUserinfo Indicates if the attribute should be added as a claim to the UserInfo response body. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToUserinfo(@Nullable Output addToUserinfo) {
            $.addToUserinfo = addToUserinfo;
            return this;
        }

        /**
         * @param addToUserinfo Indicates if the attribute should be added as a claim to the UserInfo response body. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder addToUserinfo(Boolean addToUserinfo) {
            return addToUserinfo(Output.of(addToUserinfo));
        }

        /**
         * @param aggregateAttributes Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder aggregateAttributes(@Nullable Output aggregateAttributes) {
            $.aggregateAttributes = aggregateAttributes;
            return this;
        }

        /**
         * @param aggregateAttributes Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder aggregateAttributes(Boolean aggregateAttributes) {
            return aggregateAttributes(Output.of(aggregateAttributes));
        }

        /**
         * @param claimName The name of the claim to insert into a token.
         * 
         * @return builder
         * 
         */
        public Builder claimName(Output claimName) {
            $.claimName = claimName;
            return this;
        }

        /**
         * @param claimName The name of the claim to insert into a token.
         * 
         * @return builder
         * 
         */
        public Builder claimName(String claimName) {
            return claimName(Output.of(claimName));
        }

        /**
         * @param claimValueType The claim type used when serializing JSON tokens. Can be one of `String`, `JSON`, `long`, `int`, or `boolean`. Defaults to `String`.
         * 
         * @return builder
         * 
         */
        public Builder claimValueType(@Nullable Output claimValueType) {
            $.claimValueType = claimValueType;
            return this;
        }

        /**
         * @param claimValueType The claim type used when serializing JSON tokens. Can be one of `String`, `JSON`, `long`, `int`, or `boolean`. Defaults to `String`.
         * 
         * @return builder
         * 
         */
        public Builder claimValueType(String claimValueType) {
            return claimValueType(Output.of(claimValueType));
        }

        /**
         * @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 multivalued Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder multivalued(@Nullable Output multivalued) {
            $.multivalued = multivalued;
            return this;
        }

        /**
         * @param multivalued Indicates whether this attribute is a single value or an array of values. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder multivalued(Boolean multivalued) {
            return multivalued(Output.of(multivalued));
        }

        /**
         * @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 userAttribute The custom user attribute to map a claim for.
         * 
         * @return builder
         * 
         */
        public Builder userAttribute(Output userAttribute) {
            $.userAttribute = userAttribute;
            return this;
        }

        /**
         * @param userAttribute The custom user attribute to map a claim for.
         * 
         * @return builder
         * 
         */
        public Builder userAttribute(String userAttribute) {
            return userAttribute(Output.of(userAttribute));
        }

        public UserAttributeProtocolMapperArgs build() {
            if ($.claimName == null) {
                throw new MissingRequiredPropertyException("UserAttributeProtocolMapperArgs", "claimName");
            }
            if ($.realmId == null) {
                throw new MissingRequiredPropertyException("UserAttributeProtocolMapperArgs", "realmId");
            }
            if ($.userAttribute == null) {
                throw new MissingRequiredPropertyException("UserAttributeProtocolMapperArgs", "userAttribute");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy