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

com.pulumi.azurenative.videoanalyzer.inputs.JwtAuthenticationArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.videoanalyzer.inputs;

import com.pulumi.azurenative.videoanalyzer.inputs.EccTokenKeyArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.RsaTokenKeyArgs;
import com.pulumi.azurenative.videoanalyzer.inputs.TokenClaimArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Properties for access validation based on JSON Web Tokens (JWT).
 * 
 */
public final class JwtAuthenticationArgs extends com.pulumi.resources.ResourceArgs {

    public static final JwtAuthenticationArgs Empty = new JwtAuthenticationArgs();

    /**
     * List of expected token audiences. Token audience is valid if it matches at least one of the given values.
     * 
     */
    @Import(name="audiences")
    private @Nullable Output> audiences;

    /**
     * @return List of expected token audiences. Token audience is valid if it matches at least one of the given values.
     * 
     */
    public Optional>> audiences() {
        return Optional.ofNullable(this.audiences);
    }

    /**
     * List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.
     * 
     */
    @Import(name="claims")
    private @Nullable Output> claims;

    /**
     * @return List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.
     * 
     */
    public Optional>> claims() {
        return Optional.ofNullable(this.claims);
    }

    /**
     * List of expected token issuers. Token issuer is valid if it matches at least one of the given values.
     * 
     */
    @Import(name="issuers")
    private @Nullable Output> issuers;

    /**
     * @return List of expected token issuers. Token issuer is valid if it matches at least one of the given values.
     * 
     */
    public Optional>> issuers() {
        return Optional.ofNullable(this.issuers);
    }

    /**
     * List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.
     * 
     */
    @Import(name="keys")
    private @Nullable Output>> keys;

    /**
     * @return List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.
     * 
     */
    public Optional>>> keys() {
        return Optional.ofNullable(this.keys);
    }

    /**
     * The discriminator for derived types.
     * Expected value is '#Microsoft.VideoAnalyzer.JwtAuthentication'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The discriminator for derived types.
     * Expected value is '#Microsoft.VideoAnalyzer.JwtAuthentication'.
     * 
     */
    public Output type() {
        return this.type;
    }

    private JwtAuthenticationArgs() {}

    private JwtAuthenticationArgs(JwtAuthenticationArgs $) {
        this.audiences = $.audiences;
        this.claims = $.claims;
        this.issuers = $.issuers;
        this.keys = $.keys;
        this.type = $.type;
    }

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

    public static final class Builder {
        private JwtAuthenticationArgs $;

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

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

        /**
         * @param audiences List of expected token audiences. Token audience is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder audiences(@Nullable Output> audiences) {
            $.audiences = audiences;
            return this;
        }

        /**
         * @param audiences List of expected token audiences. Token audience is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder audiences(List audiences) {
            return audiences(Output.of(audiences));
        }

        /**
         * @param audiences List of expected token audiences. Token audience is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder audiences(String... audiences) {
            return audiences(List.of(audiences));
        }

        /**
         * @param claims List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.
         * 
         * @return builder
         * 
         */
        public Builder claims(@Nullable Output> claims) {
            $.claims = claims;
            return this;
        }

        /**
         * @param claims List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.
         * 
         * @return builder
         * 
         */
        public Builder claims(List claims) {
            return claims(Output.of(claims));
        }

        /**
         * @param claims List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.
         * 
         * @return builder
         * 
         */
        public Builder claims(TokenClaimArgs... claims) {
            return claims(List.of(claims));
        }

        /**
         * @param issuers List of expected token issuers. Token issuer is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder issuers(@Nullable Output> issuers) {
            $.issuers = issuers;
            return this;
        }

        /**
         * @param issuers List of expected token issuers. Token issuer is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder issuers(List issuers) {
            return issuers(Output.of(issuers));
        }

        /**
         * @param issuers List of expected token issuers. Token issuer is valid if it matches at least one of the given values.
         * 
         * @return builder
         * 
         */
        public Builder issuers(String... issuers) {
            return issuers(List.of(issuers));
        }

        /**
         * @param keys List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.
         * 
         * @return builder
         * 
         */
        public Builder keys(@Nullable Output>> keys) {
            $.keys = keys;
            return this;
        }

        /**
         * @param keys List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.
         * 
         * @return builder
         * 
         */
        public Builder keys(List> keys) {
            return keys(Output.of(keys));
        }

        /**
         * @param keys List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.
         * 
         * @return builder
         * 
         */
        public Builder keys(Either... keys) {
            return keys(List.of(keys));
        }

        /**
         * @param type The discriminator for derived types.
         * Expected value is '#Microsoft.VideoAnalyzer.JwtAuthentication'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The discriminator for derived types.
         * Expected value is '#Microsoft.VideoAnalyzer.JwtAuthentication'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public JwtAuthenticationArgs build() {
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy