# 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 builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities

__all__ = ['FactorArgs', 'Factor']

@pulumi.input_type
class FactorArgs:
    def __init__(__self__, *,
                 provider_id: pulumi.Input[builtins.str],
                 active: Optional[pulumi.Input[builtins.bool]] = None):
        """
        The set of arguments for constructing a Factor resource.
        :param pulumi.Input[builtins.str] provider_id: The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        :param pulumi.Input[builtins.bool] active: Whether to activate the provider, by default, it is set to `true`.
        """
        pulumi.set(__self__, "provider_id", provider_id)
        if active is not None:
            pulumi.set(__self__, "active", active)

    @property
    @pulumi.getter(name="providerId")
    def provider_id(self) -> pulumi.Input[builtins.str]:
        """
        The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        return pulumi.get(self, "provider_id")

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

    @property
    @pulumi.getter
    def active(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        Whether to activate the provider, by default, it is set to `true`.
        """
        return pulumi.get(self, "active")

    @active.setter
    def active(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "active", value)


@pulumi.input_type
class _FactorState:
    def __init__(__self__, *,
                 active: Optional[pulumi.Input[builtins.bool]] = None,
                 provider_id: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Factor resources.
        :param pulumi.Input[builtins.bool] active: Whether to activate the provider, by default, it is set to `true`.
        :param pulumi.Input[builtins.str] provider_id: The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        if active is not None:
            pulumi.set(__self__, "active", active)
        if provider_id is not None:
            pulumi.set(__self__, "provider_id", provider_id)

    @property
    @pulumi.getter
    def active(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        Whether to activate the provider, by default, it is set to `true`.
        """
        return pulumi.get(self, "active")

    @active.setter
    def active(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "active", value)

    @property
    @pulumi.getter(name="providerId")
    def provider_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        return pulumi.get(self, "provider_id")

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


@pulumi.type_token("okta:factor/factor:Factor")
class Factor(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 active: Optional[pulumi.Input[builtins.bool]] = None,
                 provider_id: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        Allows you to manage the activation of Okta MFA methods. This resource allows you to manage Okta MFA methods.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.factor.Factor("example", provider_id="google_otp")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.bool] active: Whether to activate the provider, by default, it is set to `true`.
        :param pulumi.Input[builtins.str] provider_id: The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: FactorArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Allows you to manage the activation of Okta MFA methods. This resource allows you to manage Okta MFA methods.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_okta as okta

        example = okta.factor.Factor("example", provider_id="google_otp")
        ```

        :param str resource_name: The name of the resource.
        :param FactorArgs 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(FactorArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 active: Optional[pulumi.Input[builtins.bool]] = None,
                 provider_id: Optional[pulumi.Input[builtins.str]] = 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__ = FactorArgs.__new__(FactorArgs)

            __props__.__dict__["active"] = active
            if provider_id is None and not opts.urn:
                raise TypeError("Missing required property 'provider_id'")
            __props__.__dict__["provider_id"] = provider_id
        super(Factor, __self__).__init__(
            'okta:factor/factor:Factor',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            active: Optional[pulumi.Input[builtins.bool]] = None,
            provider_id: Optional[pulumi.Input[builtins.str]] = None) -> 'Factor':
        """
        Get an existing Factor 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[builtins.bool] active: Whether to activate the provider, by default, it is set to `true`.
        :param pulumi.Input[builtins.str] provider_id: The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _FactorState.__new__(_FactorState)

        __props__.__dict__["active"] = active
        __props__.__dict__["provider_id"] = provider_id
        return Factor(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def active(self) -> pulumi.Output[Optional[builtins.bool]]:
        """
        Whether to activate the provider, by default, it is set to `true`.
        """
        return pulumi.get(self, "active")

    @property
    @pulumi.getter(name="providerId")
    def provider_id(self) -> pulumi.Output[builtins.str]:
        """
        The MFA provider name. Allowed values are `duo`, `fido_u2f`, `fido_webauthn`, `google_otp`, `okta_call`, `okta_otp`, `okta_password`, `okta_push`, `okta_question`, `okta_sms`, `okta_email`, `rsa_token`, `symantec_vip`, `yubikey_token`, or `hotp`.
        """
        return pulumi.get(self, "provider_id")

