# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs
from ._inputs import *

__all__ = ['ThreeField']


class ThreeField(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 accessibility_error_redirect_url: Optional[pulumi.Input[str]] = None,
                 accessibility_self_service: Optional[pulumi.Input[bool]] = None,
                 auto_submit_toolbar: Optional[pulumi.Input[bool]] = None,
                 button_selector: Optional[pulumi.Input[str]] = None,
                 extra_field_selector: Optional[pulumi.Input[str]] = None,
                 extra_field_value: Optional[pulumi.Input[str]] = None,
                 groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 hide_ios: Optional[pulumi.Input[bool]] = None,
                 hide_web: Optional[pulumi.Input[bool]] = None,
                 label: Optional[pulumi.Input[str]] = None,
                 password_selector: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[str]] = None,
                 url: Optional[pulumi.Input[str]] = None,
                 url_regex: Optional[pulumi.Input[str]] = None,
                 user_name_template: Optional[pulumi.Input[str]] = None,
                 user_name_template_suffix: Optional[pulumi.Input[str]] = None,
                 user_name_template_type: Optional[pulumi.Input[str]] = None,
                 username_selector: Optional[pulumi.Input[str]] = None,
                 users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ThreeFieldUserArgs']]]]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Creates a Three Field Application.

        This resource allows you to create and configure a Three Field Application.

        ## Import

        A Three Field App can be imported via the Okta ID.

        ```sh
         $ pulumi import okta:app/threeField:ThreeField example <app id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] accessibility_error_redirect_url: Custom error page URL.
        :param pulumi.Input[bool] accessibility_self_service: Enable self-service. By default, it is `false`.
        :param pulumi.Input[bool] auto_submit_toolbar: Display auto submit toolbar.
        :param pulumi.Input[str] button_selector: Login button field CSS selector.
        :param pulumi.Input[str] extra_field_selector: Extra field CSS selector.
        :param pulumi.Input[str] extra_field_value: Value for extra form field.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Groups associated with the application. See `app.GroupAssignment` for a more flexible approach.
        :param pulumi.Input[bool] hide_ios: Do not display application icon on mobile app.
        :param pulumi.Input[bool] hide_web: Do not display application icon to users.
        :param pulumi.Input[str] label: The display name of the Application.
        :param pulumi.Input[str] password_selector: Login password field CSS selector.
        :param pulumi.Input[str] status: Status of application. By default, it is `"ACTIVE"`.
        :param pulumi.Input[str] url: Login URL.
        :param pulumi.Input[str] url_regex: A regex that further restricts URL to the specified regex.
        :param pulumi.Input[str] user_name_template: The default username assigned to each user.
        :param pulumi.Input[str] user_name_template_suffix: Username template suffix
        :param pulumi.Input[str] user_name_template_type: The Username template type.
        :param pulumi.Input[str] username_selector: Login username field CSS selector.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ThreeFieldUserArgs']]]] users: The users assigned to the application. See `app.User` for a more flexible approach.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__ = dict()

            __props__['accessibility_error_redirect_url'] = accessibility_error_redirect_url
            __props__['accessibility_self_service'] = accessibility_self_service
            __props__['auto_submit_toolbar'] = auto_submit_toolbar
            if button_selector is None and not opts.urn:
                raise TypeError("Missing required property 'button_selector'")
            __props__['button_selector'] = button_selector
            if extra_field_selector is None and not opts.urn:
                raise TypeError("Missing required property 'extra_field_selector'")
            __props__['extra_field_selector'] = extra_field_selector
            if extra_field_value is None and not opts.urn:
                raise TypeError("Missing required property 'extra_field_value'")
            __props__['extra_field_value'] = extra_field_value
            __props__['groups'] = groups
            __props__['hide_ios'] = hide_ios
            __props__['hide_web'] = hide_web
            if label is None and not opts.urn:
                raise TypeError("Missing required property 'label'")
            __props__['label'] = label
            if password_selector is None and not opts.urn:
                raise TypeError("Missing required property 'password_selector'")
            __props__['password_selector'] = password_selector
            __props__['status'] = status
            if url is None and not opts.urn:
                raise TypeError("Missing required property 'url'")
            __props__['url'] = url
            __props__['url_regex'] = url_regex
            __props__['user_name_template'] = user_name_template
            __props__['user_name_template_suffix'] = user_name_template_suffix
            __props__['user_name_template_type'] = user_name_template_type
            if username_selector is None and not opts.urn:
                raise TypeError("Missing required property 'username_selector'")
            __props__['username_selector'] = username_selector
            __props__['users'] = users
            __props__['name'] = None
            __props__['sign_on_mode'] = None
        super(ThreeField, __self__).__init__(
            'okta:app/threeField:ThreeField',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            accessibility_error_redirect_url: Optional[pulumi.Input[str]] = None,
            accessibility_self_service: Optional[pulumi.Input[bool]] = None,
            auto_submit_toolbar: Optional[pulumi.Input[bool]] = None,
            button_selector: Optional[pulumi.Input[str]] = None,
            extra_field_selector: Optional[pulumi.Input[str]] = None,
            extra_field_value: Optional[pulumi.Input[str]] = None,
            groups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            hide_ios: Optional[pulumi.Input[bool]] = None,
            hide_web: Optional[pulumi.Input[bool]] = None,
            label: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            password_selector: Optional[pulumi.Input[str]] = None,
            sign_on_mode: Optional[pulumi.Input[str]] = None,
            status: Optional[pulumi.Input[str]] = None,
            url: Optional[pulumi.Input[str]] = None,
            url_regex: Optional[pulumi.Input[str]] = None,
            user_name_template: Optional[pulumi.Input[str]] = None,
            user_name_template_suffix: Optional[pulumi.Input[str]] = None,
            user_name_template_type: Optional[pulumi.Input[str]] = None,
            username_selector: Optional[pulumi.Input[str]] = None,
            users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ThreeFieldUserArgs']]]]] = None) -> 'ThreeField':
        """
        Get an existing ThreeField 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[str] accessibility_error_redirect_url: Custom error page URL.
        :param pulumi.Input[bool] accessibility_self_service: Enable self-service. By default, it is `false`.
        :param pulumi.Input[bool] auto_submit_toolbar: Display auto submit toolbar.
        :param pulumi.Input[str] button_selector: Login button field CSS selector.
        :param pulumi.Input[str] extra_field_selector: Extra field CSS selector.
        :param pulumi.Input[str] extra_field_value: Value for extra form field.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] groups: Groups associated with the application. See `app.GroupAssignment` for a more flexible approach.
        :param pulumi.Input[bool] hide_ios: Do not display application icon on mobile app.
        :param pulumi.Input[bool] hide_web: Do not display application icon to users.
        :param pulumi.Input[str] label: The display name of the Application.
        :param pulumi.Input[str] name: Name assigned to the application by Okta.
        :param pulumi.Input[str] password_selector: Login password field CSS selector.
        :param pulumi.Input[str] sign_on_mode: Sign-on mode of application.
        :param pulumi.Input[str] status: Status of application. By default, it is `"ACTIVE"`.
        :param pulumi.Input[str] url: Login URL.
        :param pulumi.Input[str] url_regex: A regex that further restricts URL to the specified regex.
        :param pulumi.Input[str] user_name_template: The default username assigned to each user.
        :param pulumi.Input[str] user_name_template_suffix: Username template suffix
        :param pulumi.Input[str] user_name_template_type: The Username template type.
        :param pulumi.Input[str] username_selector: Login username field CSS selector.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ThreeFieldUserArgs']]]] users: The users assigned to the application. See `app.User` for a more flexible approach.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["accessibility_error_redirect_url"] = accessibility_error_redirect_url
        __props__["accessibility_self_service"] = accessibility_self_service
        __props__["auto_submit_toolbar"] = auto_submit_toolbar
        __props__["button_selector"] = button_selector
        __props__["extra_field_selector"] = extra_field_selector
        __props__["extra_field_value"] = extra_field_value
        __props__["groups"] = groups
        __props__["hide_ios"] = hide_ios
        __props__["hide_web"] = hide_web
        __props__["label"] = label
        __props__["name"] = name
        __props__["password_selector"] = password_selector
        __props__["sign_on_mode"] = sign_on_mode
        __props__["status"] = status
        __props__["url"] = url
        __props__["url_regex"] = url_regex
        __props__["user_name_template"] = user_name_template
        __props__["user_name_template_suffix"] = user_name_template_suffix
        __props__["user_name_template_type"] = user_name_template_type
        __props__["username_selector"] = username_selector
        __props__["users"] = users
        return ThreeField(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="accessibilityErrorRedirectUrl")
    def accessibility_error_redirect_url(self) -> pulumi.Output[Optional[str]]:
        """
        Custom error page URL.
        """
        return pulumi.get(self, "accessibility_error_redirect_url")

    @property
    @pulumi.getter(name="accessibilitySelfService")
    def accessibility_self_service(self) -> pulumi.Output[Optional[bool]]:
        """
        Enable self-service. By default, it is `false`.
        """
        return pulumi.get(self, "accessibility_self_service")

    @property
    @pulumi.getter(name="autoSubmitToolbar")
    def auto_submit_toolbar(self) -> pulumi.Output[Optional[bool]]:
        """
        Display auto submit toolbar.
        """
        return pulumi.get(self, "auto_submit_toolbar")

    @property
    @pulumi.getter(name="buttonSelector")
    def button_selector(self) -> pulumi.Output[str]:
        """
        Login button field CSS selector.
        """
        return pulumi.get(self, "button_selector")

    @property
    @pulumi.getter(name="extraFieldSelector")
    def extra_field_selector(self) -> pulumi.Output[str]:
        """
        Extra field CSS selector.
        """
        return pulumi.get(self, "extra_field_selector")

    @property
    @pulumi.getter(name="extraFieldValue")
    def extra_field_value(self) -> pulumi.Output[str]:
        """
        Value for extra form field.
        """
        return pulumi.get(self, "extra_field_value")

    @property
    @pulumi.getter
    def groups(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Groups associated with the application. See `app.GroupAssignment` for a more flexible approach.
        """
        return pulumi.get(self, "groups")

    @property
    @pulumi.getter(name="hideIos")
    def hide_ios(self) -> pulumi.Output[Optional[bool]]:
        """
        Do not display application icon on mobile app.
        """
        return pulumi.get(self, "hide_ios")

    @property
    @pulumi.getter(name="hideWeb")
    def hide_web(self) -> pulumi.Output[Optional[bool]]:
        """
        Do not display application icon to users.
        """
        return pulumi.get(self, "hide_web")

    @property
    @pulumi.getter
    def label(self) -> pulumi.Output[str]:
        """
        The display name of the Application.
        """
        return pulumi.get(self, "label")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Name assigned to the application by Okta.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="passwordSelector")
    def password_selector(self) -> pulumi.Output[str]:
        """
        Login password field CSS selector.
        """
        return pulumi.get(self, "password_selector")

    @property
    @pulumi.getter(name="signOnMode")
    def sign_on_mode(self) -> pulumi.Output[str]:
        """
        Sign-on mode of application.
        """
        return pulumi.get(self, "sign_on_mode")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[Optional[str]]:
        """
        Status of application. By default, it is `"ACTIVE"`.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def url(self) -> pulumi.Output[str]:
        """
        Login URL.
        """
        return pulumi.get(self, "url")

    @property
    @pulumi.getter(name="urlRegex")
    def url_regex(self) -> pulumi.Output[Optional[str]]:
        """
        A regex that further restricts URL to the specified regex.
        """
        return pulumi.get(self, "url_regex")

    @property
    @pulumi.getter(name="userNameTemplate")
    def user_name_template(self) -> pulumi.Output[Optional[str]]:
        """
        The default username assigned to each user.
        """
        return pulumi.get(self, "user_name_template")

    @property
    @pulumi.getter(name="userNameTemplateSuffix")
    def user_name_template_suffix(self) -> pulumi.Output[Optional[str]]:
        """
        Username template suffix
        """
        return pulumi.get(self, "user_name_template_suffix")

    @property
    @pulumi.getter(name="userNameTemplateType")
    def user_name_template_type(self) -> pulumi.Output[Optional[str]]:
        """
        The Username template type.
        """
        return pulumi.get(self, "user_name_template_type")

    @property
    @pulumi.getter(name="usernameSelector")
    def username_selector(self) -> pulumi.Output[str]:
        """
        Login username field CSS selector.
        """
        return pulumi.get(self, "username_selector")

    @property
    @pulumi.getter
    def users(self) -> pulumi.Output[Optional[Sequence['outputs.ThreeFieldUser']]]:
        """
        The users assigned to the application. See `app.User` for a more flexible approach.
        """
        return pulumi.get(self, "users")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

