# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['FactorTotpArgs', 'FactorTotp']

@pulumi.input_type
class FactorTotpArgs:
    def __init__(__self__, *,
                 clock_drift_interval: Optional[pulumi.Input[int]] = None,
                 hmac_algorithm: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 otp_length: Optional[pulumi.Input[int]] = None,
                 shared_secret_encoding: Optional[pulumi.Input[str]] = None,
                 time_step: Optional[pulumi.Input[int]] = None):
        """
        The set of arguments for constructing a FactorTotp resource.
        :param pulumi.Input[int] clock_drift_interval: Clock drift interval
        :param pulumi.Input[str] hmac_algorithm: Hash-based message authentication code algorithm
        :param pulumi.Input[str] name: The TOTP name.
        :param pulumi.Input[int] otp_length: Length of the password. Default is `6`.
        :param pulumi.Input[str] shared_secret_encoding: Shared secret encoding
        :param pulumi.Input[int] time_step: Time step in seconds
        """
        FactorTotpArgs._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            clock_drift_interval=clock_drift_interval,
            hmac_algorithm=hmac_algorithm,
            name=name,
            otp_length=otp_length,
            shared_secret_encoding=shared_secret_encoding,
            time_step=time_step,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             clock_drift_interval: Optional[pulumi.Input[int]] = None,
             hmac_algorithm: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             otp_length: Optional[pulumi.Input[int]] = None,
             shared_secret_encoding: Optional[pulumi.Input[str]] = None,
             time_step: Optional[pulumi.Input[int]] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'clockDriftInterval' in kwargs:
            clock_drift_interval = kwargs['clockDriftInterval']
        if 'hmacAlgorithm' in kwargs:
            hmac_algorithm = kwargs['hmacAlgorithm']
        if 'otpLength' in kwargs:
            otp_length = kwargs['otpLength']
        if 'sharedSecretEncoding' in kwargs:
            shared_secret_encoding = kwargs['sharedSecretEncoding']
        if 'timeStep' in kwargs:
            time_step = kwargs['timeStep']

        if clock_drift_interval is not None:
            _setter("clock_drift_interval", clock_drift_interval)
        if hmac_algorithm is not None:
            _setter("hmac_algorithm", hmac_algorithm)
        if name is not None:
            _setter("name", name)
        if otp_length is not None:
            _setter("otp_length", otp_length)
        if shared_secret_encoding is not None:
            _setter("shared_secret_encoding", shared_secret_encoding)
        if time_step is not None:
            _setter("time_step", time_step)

    @property
    @pulumi.getter(name="clockDriftInterval")
    def clock_drift_interval(self) -> Optional[pulumi.Input[int]]:
        """
        Clock drift interval
        """
        return pulumi.get(self, "clock_drift_interval")

    @clock_drift_interval.setter
    def clock_drift_interval(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "clock_drift_interval", value)

    @property
    @pulumi.getter(name="hmacAlgorithm")
    def hmac_algorithm(self) -> Optional[pulumi.Input[str]]:
        """
        Hash-based message authentication code algorithm
        """
        return pulumi.get(self, "hmac_algorithm")

    @hmac_algorithm.setter
    def hmac_algorithm(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "hmac_algorithm", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The TOTP name.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="otpLength")
    def otp_length(self) -> Optional[pulumi.Input[int]]:
        """
        Length of the password. Default is `6`.
        """
        return pulumi.get(self, "otp_length")

    @otp_length.setter
    def otp_length(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "otp_length", value)

    @property
    @pulumi.getter(name="sharedSecretEncoding")
    def shared_secret_encoding(self) -> Optional[pulumi.Input[str]]:
        """
        Shared secret encoding
        """
        return pulumi.get(self, "shared_secret_encoding")

    @shared_secret_encoding.setter
    def shared_secret_encoding(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "shared_secret_encoding", value)

    @property
    @pulumi.getter(name="timeStep")
    def time_step(self) -> Optional[pulumi.Input[int]]:
        """
        Time step in seconds
        """
        return pulumi.get(self, "time_step")

    @time_step.setter
    def time_step(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "time_step", value)


@pulumi.input_type
class _FactorTotpState:
    def __init__(__self__, *,
                 clock_drift_interval: Optional[pulumi.Input[int]] = None,
                 hmac_algorithm: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 otp_length: Optional[pulumi.Input[int]] = None,
                 shared_secret_encoding: Optional[pulumi.Input[str]] = None,
                 time_step: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering FactorTotp resources.
        :param pulumi.Input[int] clock_drift_interval: Clock drift interval
        :param pulumi.Input[str] hmac_algorithm: Hash-based message authentication code algorithm
        :param pulumi.Input[str] name: The TOTP name.
        :param pulumi.Input[int] otp_length: Length of the password. Default is `6`.
        :param pulumi.Input[str] shared_secret_encoding: Shared secret encoding
        :param pulumi.Input[int] time_step: Time step in seconds
        """
        _FactorTotpState._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            clock_drift_interval=clock_drift_interval,
            hmac_algorithm=hmac_algorithm,
            name=name,
            otp_length=otp_length,
            shared_secret_encoding=shared_secret_encoding,
            time_step=time_step,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             clock_drift_interval: Optional[pulumi.Input[int]] = None,
             hmac_algorithm: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             otp_length: Optional[pulumi.Input[int]] = None,
             shared_secret_encoding: Optional[pulumi.Input[str]] = None,
             time_step: Optional[pulumi.Input[int]] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'clockDriftInterval' in kwargs:
            clock_drift_interval = kwargs['clockDriftInterval']
        if 'hmacAlgorithm' in kwargs:
            hmac_algorithm = kwargs['hmacAlgorithm']
        if 'otpLength' in kwargs:
            otp_length = kwargs['otpLength']
        if 'sharedSecretEncoding' in kwargs:
            shared_secret_encoding = kwargs['sharedSecretEncoding']
        if 'timeStep' in kwargs:
            time_step = kwargs['timeStep']

        if clock_drift_interval is not None:
            _setter("clock_drift_interval", clock_drift_interval)
        if hmac_algorithm is not None:
            _setter("hmac_algorithm", hmac_algorithm)
        if name is not None:
            _setter("name", name)
        if otp_length is not None:
            _setter("otp_length", otp_length)
        if shared_secret_encoding is not None:
            _setter("shared_secret_encoding", shared_secret_encoding)
        if time_step is not None:
            _setter("time_step", time_step)

    @property
    @pulumi.getter(name="clockDriftInterval")
    def clock_drift_interval(self) -> Optional[pulumi.Input[int]]:
        """
        Clock drift interval
        """
        return pulumi.get(self, "clock_drift_interval")

    @clock_drift_interval.setter
    def clock_drift_interval(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "clock_drift_interval", value)

    @property
    @pulumi.getter(name="hmacAlgorithm")
    def hmac_algorithm(self) -> Optional[pulumi.Input[str]]:
        """
        Hash-based message authentication code algorithm
        """
        return pulumi.get(self, "hmac_algorithm")

    @hmac_algorithm.setter
    def hmac_algorithm(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "hmac_algorithm", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The TOTP name.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="otpLength")
    def otp_length(self) -> Optional[pulumi.Input[int]]:
        """
        Length of the password. Default is `6`.
        """
        return pulumi.get(self, "otp_length")

    @otp_length.setter
    def otp_length(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "otp_length", value)

    @property
    @pulumi.getter(name="sharedSecretEncoding")
    def shared_secret_encoding(self) -> Optional[pulumi.Input[str]]:
        """
        Shared secret encoding
        """
        return pulumi.get(self, "shared_secret_encoding")

    @shared_secret_encoding.setter
    def shared_secret_encoding(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "shared_secret_encoding", value)

    @property
    @pulumi.getter(name="timeStep")
    def time_step(self) -> Optional[pulumi.Input[int]]:
        """
        Time step in seconds
        """
        return pulumi.get(self, "time_step")

    @time_step.setter
    def time_step(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "time_step", value)


class FactorTotp(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 clock_drift_interval: Optional[pulumi.Input[int]] = None,
                 hmac_algorithm: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 otp_length: Optional[pulumi.Input[int]] = None,
                 shared_secret_encoding: Optional[pulumi.Input[str]] = None,
                 time_step: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        Create a FactorTotp resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] clock_drift_interval: Clock drift interval
        :param pulumi.Input[str] hmac_algorithm: Hash-based message authentication code algorithm
        :param pulumi.Input[str] name: The TOTP name.
        :param pulumi.Input[int] otp_length: Length of the password. Default is `6`.
        :param pulumi.Input[str] shared_secret_encoding: Shared secret encoding
        :param pulumi.Input[int] time_step: Time step in seconds
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[FactorTotpArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a FactorTotp resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param FactorTotpArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(FactorTotpArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            kwargs = kwargs or {}
            def _setter(key, value):
                kwargs[key] = value
            FactorTotpArgs._configure(_setter, **kwargs)
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 clock_drift_interval: Optional[pulumi.Input[int]] = None,
                 hmac_algorithm: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 otp_length: Optional[pulumi.Input[int]] = None,
                 shared_secret_encoding: Optional[pulumi.Input[str]] = None,
                 time_step: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = FactorTotpArgs.__new__(FactorTotpArgs)

            __props__.__dict__["clock_drift_interval"] = clock_drift_interval
            __props__.__dict__["hmac_algorithm"] = hmac_algorithm
            __props__.__dict__["name"] = name
            __props__.__dict__["otp_length"] = otp_length
            __props__.__dict__["shared_secret_encoding"] = shared_secret_encoding
            __props__.__dict__["time_step"] = time_step
        super(FactorTotp, __self__).__init__(
            'okta:index/factorTotp:FactorTotp',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            clock_drift_interval: Optional[pulumi.Input[int]] = None,
            hmac_algorithm: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            otp_length: Optional[pulumi.Input[int]] = None,
            shared_secret_encoding: Optional[pulumi.Input[str]] = None,
            time_step: Optional[pulumi.Input[int]] = None) -> 'FactorTotp':
        """
        Get an existing FactorTotp resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] clock_drift_interval: Clock drift interval
        :param pulumi.Input[str] hmac_algorithm: Hash-based message authentication code algorithm
        :param pulumi.Input[str] name: The TOTP name.
        :param pulumi.Input[int] otp_length: Length of the password. Default is `6`.
        :param pulumi.Input[str] shared_secret_encoding: Shared secret encoding
        :param pulumi.Input[int] time_step: Time step in seconds
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _FactorTotpState.__new__(_FactorTotpState)

        __props__.__dict__["clock_drift_interval"] = clock_drift_interval
        __props__.__dict__["hmac_algorithm"] = hmac_algorithm
        __props__.__dict__["name"] = name
        __props__.__dict__["otp_length"] = otp_length
        __props__.__dict__["shared_secret_encoding"] = shared_secret_encoding
        __props__.__dict__["time_step"] = time_step
        return FactorTotp(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="clockDriftInterval")
    def clock_drift_interval(self) -> pulumi.Output[Optional[int]]:
        """
        Clock drift interval
        """
        return pulumi.get(self, "clock_drift_interval")

    @property
    @pulumi.getter(name="hmacAlgorithm")
    def hmac_algorithm(self) -> pulumi.Output[Optional[str]]:
        """
        Hash-based message authentication code algorithm
        """
        return pulumi.get(self, "hmac_algorithm")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The TOTP name.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="otpLength")
    def otp_length(self) -> pulumi.Output[Optional[int]]:
        """
        Length of the password. Default is `6`.
        """
        return pulumi.get(self, "otp_length")

    @property
    @pulumi.getter(name="sharedSecretEncoding")
    def shared_secret_encoding(self) -> pulumi.Output[Optional[str]]:
        """
        Shared secret encoding
        """
        return pulumi.get(self, "shared_secret_encoding")

    @property
    @pulumi.getter(name="timeStep")
    def time_step(self) -> pulumi.Output[Optional[int]]:
        """
        Time step in seconds
        """
        return pulumi.get(self, "time_step")

