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

com.pulumi.vault.MfaTotpArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

There is a newer version: 6.5.0-alpha.1732775348
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.vault;

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


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

    public static final MfaTotpArgs Empty = new MfaTotpArgs();

    /**
     * `(string)` - Specifies the hashing algorithm used to generate the TOTP code.
     * Options include `SHA1`, `SHA256` and `SHA512`
     * 
     */
    @Import(name="algorithm")
    private @Nullable Output algorithm;

    /**
     * @return `(string)` - Specifies the hashing algorithm used to generate the TOTP code.
     * Options include `SHA1`, `SHA256` and `SHA512`
     * 
     */
    public Optional> algorithm() {
        return Optional.ofNullable(this.algorithm);
    }

    /**
     * `(int)` - The number of digits in the generated TOTP token.
     * This value can either be 6 or 8.
     * 
     */
    @Import(name="digits")
    private @Nullable Output digits;

    /**
     * @return `(int)` - The number of digits in the generated TOTP token.
     * This value can either be 6 or 8.
     * 
     */
    public Optional> digits() {
        return Optional.ofNullable(this.digits);
    }

    /**
     * `(string: <required>)` - The name of the key's issuing organization.
     * 
     */
    @Import(name="issuer", required=true)
    private Output issuer;

    /**
     * @return `(string: <required>)` - The name of the key's issuing organization.
     * 
     */
    public Output issuer() {
        return this.issuer;
    }

    /**
     * `(int)` - Specifies the size in bytes of the generated key.
     * 
     */
    @Import(name="keySize")
    private @Nullable Output keySize;

    /**
     * @return `(int)` - Specifies the size in bytes of the generated key.
     * 
     */
    public Optional> keySize() {
        return Optional.ofNullable(this.keySize);
    }

    /**
     * `(string: <required>)` – Name of the MFA method.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return `(string: <required>)` – Name of the MFA method.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     * 
     */
    @Import(name="namespace")
    private @Nullable Output namespace;

    /**
     * @return The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     * 
     */
    public Optional> namespace() {
        return Optional.ofNullable(this.namespace);
    }

    /**
     * `(int)` - The length of time used to generate a counter for the TOTP token calculation.
     * 
     */
    @Import(name="period")
    private @Nullable Output period;

    /**
     * @return `(int)` - The length of time used to generate a counter for the TOTP token calculation.
     * 
     */
    public Optional> period() {
        return Optional.ofNullable(this.period);
    }

    /**
     * `(int)` - The pixel size of the generated square QR code.
     * 
     */
    @Import(name="qrSize")
    private @Nullable Output qrSize;

    /**
     * @return `(int)` - The pixel size of the generated square QR code.
     * 
     */
    public Optional> qrSize() {
        return Optional.ofNullable(this.qrSize);
    }

    /**
     * `(int)` - The number of delay periods that are allowed when validating a TOTP token.
     * This value can either be 0 or 1.
     * 
     */
    @Import(name="skew")
    private @Nullable Output skew;

    /**
     * @return `(int)` - The number of delay periods that are allowed when validating a TOTP token.
     * This value can either be 0 or 1.
     * 
     */
    public Optional> skew() {
        return Optional.ofNullable(this.skew);
    }

    private MfaTotpArgs() {}

    private MfaTotpArgs(MfaTotpArgs $) {
        this.algorithm = $.algorithm;
        this.digits = $.digits;
        this.issuer = $.issuer;
        this.keySize = $.keySize;
        this.name = $.name;
        this.namespace = $.namespace;
        this.period = $.period;
        this.qrSize = $.qrSize;
        this.skew = $.skew;
    }

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

    public static final class Builder {
        private MfaTotpArgs $;

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

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

        /**
         * @param algorithm `(string)` - Specifies the hashing algorithm used to generate the TOTP code.
         * Options include `SHA1`, `SHA256` and `SHA512`
         * 
         * @return builder
         * 
         */
        public Builder algorithm(@Nullable Output algorithm) {
            $.algorithm = algorithm;
            return this;
        }

        /**
         * @param algorithm `(string)` - Specifies the hashing algorithm used to generate the TOTP code.
         * Options include `SHA1`, `SHA256` and `SHA512`
         * 
         * @return builder
         * 
         */
        public Builder algorithm(String algorithm) {
            return algorithm(Output.of(algorithm));
        }

        /**
         * @param digits `(int)` - The number of digits in the generated TOTP token.
         * This value can either be 6 or 8.
         * 
         * @return builder
         * 
         */
        public Builder digits(@Nullable Output digits) {
            $.digits = digits;
            return this;
        }

        /**
         * @param digits `(int)` - The number of digits in the generated TOTP token.
         * This value can either be 6 or 8.
         * 
         * @return builder
         * 
         */
        public Builder digits(Integer digits) {
            return digits(Output.of(digits));
        }

        /**
         * @param issuer `(string: <required>)` - The name of the key's issuing organization.
         * 
         * @return builder
         * 
         */
        public Builder issuer(Output issuer) {
            $.issuer = issuer;
            return this;
        }

        /**
         * @param issuer `(string: <required>)` - The name of the key's issuing organization.
         * 
         * @return builder
         * 
         */
        public Builder issuer(String issuer) {
            return issuer(Output.of(issuer));
        }

        /**
         * @param keySize `(int)` - Specifies the size in bytes of the generated key.
         * 
         * @return builder
         * 
         */
        public Builder keySize(@Nullable Output keySize) {
            $.keySize = keySize;
            return this;
        }

        /**
         * @param keySize `(int)` - Specifies the size in bytes of the generated key.
         * 
         * @return builder
         * 
         */
        public Builder keySize(Integer keySize) {
            return keySize(Output.of(keySize));
        }

        /**
         * @param name `(string: <required>)` – Name of the MFA method.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name `(string: <required>)` – Name of the MFA method.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param namespace The namespace to provision the resource in.
         * The value should not contain leading or trailing forward slashes.
         * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
         * *Available only for Vault Enterprise*.
         * 
         * @return builder
         * 
         */
        public Builder namespace(@Nullable Output namespace) {
            $.namespace = namespace;
            return this;
        }

        /**
         * @param namespace The namespace to provision the resource in.
         * The value should not contain leading or trailing forward slashes.
         * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
         * *Available only for Vault Enterprise*.
         * 
         * @return builder
         * 
         */
        public Builder namespace(String namespace) {
            return namespace(Output.of(namespace));
        }

        /**
         * @param period `(int)` - The length of time used to generate a counter for the TOTP token calculation.
         * 
         * @return builder
         * 
         */
        public Builder period(@Nullable Output period) {
            $.period = period;
            return this;
        }

        /**
         * @param period `(int)` - The length of time used to generate a counter for the TOTP token calculation.
         * 
         * @return builder
         * 
         */
        public Builder period(Integer period) {
            return period(Output.of(period));
        }

        /**
         * @param qrSize `(int)` - The pixel size of the generated square QR code.
         * 
         * @return builder
         * 
         */
        public Builder qrSize(@Nullable Output qrSize) {
            $.qrSize = qrSize;
            return this;
        }

        /**
         * @param qrSize `(int)` - The pixel size of the generated square QR code.
         * 
         * @return builder
         * 
         */
        public Builder qrSize(Integer qrSize) {
            return qrSize(Output.of(qrSize));
        }

        /**
         * @param skew `(int)` - The number of delay periods that are allowed when validating a TOTP token.
         * This value can either be 0 or 1.
         * 
         * @return builder
         * 
         */
        public Builder skew(@Nullable Output skew) {
            $.skew = skew;
            return this;
        }

        /**
         * @param skew `(int)` - The number of delay periods that are allowed when validating a TOTP token.
         * This value can either be 0 or 1.
         * 
         * @return builder
         * 
         */
        public Builder skew(Integer skew) {
            return skew(Output.of(skew));
        }

        public MfaTotpArgs build() {
            if ($.issuer == null) {
                throw new MissingRequiredPropertyException("MfaTotpArgs", "issuer");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy