# 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__ = ['RoleArgs', 'Role']

@pulumi.input_type
class RoleArgs:
    def __init__(__self__, *,
                 group_id: pulumi.Input[str],
                 role_type: pulumi.Input[str],
                 disable_notifications: Optional[pulumi.Input[bool]] = None,
                 target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        The set of arguments for constructing a Role resource.
        :param pulumi.Input[str] group_id: ID of group to attach admin roles to
        :param pulumi.Input[str] role_type: Type of Role to assign
        :param pulumi.Input[bool] disable_notifications: When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_app_lists: List of apps ids for the targets of the admin role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_group_lists: List of groups ids for the targets of the admin role.
        """
        RoleArgs._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            group_id=group_id,
            role_type=role_type,
            disable_notifications=disable_notifications,
            target_app_lists=target_app_lists,
            target_group_lists=target_group_lists,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             group_id: pulumi.Input[str],
             role_type: pulumi.Input[str],
             disable_notifications: Optional[pulumi.Input[bool]] = None,
             target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'groupId' in kwargs:
            group_id = kwargs['groupId']
        if 'roleType' in kwargs:
            role_type = kwargs['roleType']
        if 'disableNotifications' in kwargs:
            disable_notifications = kwargs['disableNotifications']
        if 'targetAppLists' in kwargs:
            target_app_lists = kwargs['targetAppLists']
        if 'targetGroupLists' in kwargs:
            target_group_lists = kwargs['targetGroupLists']

        _setter("group_id", group_id)
        _setter("role_type", role_type)
        if disable_notifications is not None:
            _setter("disable_notifications", disable_notifications)
        if target_app_lists is not None:
            _setter("target_app_lists", target_app_lists)
        if target_group_lists is not None:
            _setter("target_group_lists", target_group_lists)

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> pulumi.Input[str]:
        """
        ID of group to attach admin roles to
        """
        return pulumi.get(self, "group_id")

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

    @property
    @pulumi.getter(name="roleType")
    def role_type(self) -> pulumi.Input[str]:
        """
        Type of Role to assign
        """
        return pulumi.get(self, "role_type")

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

    @property
    @pulumi.getter(name="disableNotifications")
    def disable_notifications(self) -> Optional[pulumi.Input[bool]]:
        """
        When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        """
        return pulumi.get(self, "disable_notifications")

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

    @property
    @pulumi.getter(name="targetAppLists")
    def target_app_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of apps ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_app_lists")

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

    @property
    @pulumi.getter(name="targetGroupLists")
    def target_group_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of groups ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_group_lists")

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


@pulumi.input_type
class _RoleState:
    def __init__(__self__, *,
                 disable_notifications: Optional[pulumi.Input[bool]] = None,
                 group_id: Optional[pulumi.Input[str]] = None,
                 role_type: Optional[pulumi.Input[str]] = None,
                 target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        Input properties used for looking up and filtering Role resources.
        :param pulumi.Input[bool] disable_notifications: When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        :param pulumi.Input[str] group_id: ID of group to attach admin roles to
        :param pulumi.Input[str] role_type: Type of Role to assign
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_app_lists: List of apps ids for the targets of the admin role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_group_lists: List of groups ids for the targets of the admin role.
        """
        _RoleState._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            disable_notifications=disable_notifications,
            group_id=group_id,
            role_type=role_type,
            target_app_lists=target_app_lists,
            target_group_lists=target_group_lists,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             disable_notifications: Optional[pulumi.Input[bool]] = None,
             group_id: Optional[pulumi.Input[str]] = None,
             role_type: Optional[pulumi.Input[str]] = None,
             target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'disableNotifications' in kwargs:
            disable_notifications = kwargs['disableNotifications']
        if 'groupId' in kwargs:
            group_id = kwargs['groupId']
        if 'roleType' in kwargs:
            role_type = kwargs['roleType']
        if 'targetAppLists' in kwargs:
            target_app_lists = kwargs['targetAppLists']
        if 'targetGroupLists' in kwargs:
            target_group_lists = kwargs['targetGroupLists']

        if disable_notifications is not None:
            _setter("disable_notifications", disable_notifications)
        if group_id is not None:
            _setter("group_id", group_id)
        if role_type is not None:
            _setter("role_type", role_type)
        if target_app_lists is not None:
            _setter("target_app_lists", target_app_lists)
        if target_group_lists is not None:
            _setter("target_group_lists", target_group_lists)

    @property
    @pulumi.getter(name="disableNotifications")
    def disable_notifications(self) -> Optional[pulumi.Input[bool]]:
        """
        When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        """
        return pulumi.get(self, "disable_notifications")

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

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> Optional[pulumi.Input[str]]:
        """
        ID of group to attach admin roles to
        """
        return pulumi.get(self, "group_id")

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

    @property
    @pulumi.getter(name="roleType")
    def role_type(self) -> Optional[pulumi.Input[str]]:
        """
        Type of Role to assign
        """
        return pulumi.get(self, "role_type")

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

    @property
    @pulumi.getter(name="targetAppLists")
    def target_app_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of apps ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_app_lists")

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

    @property
    @pulumi.getter(name="targetGroupLists")
    def target_group_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        List of groups ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_group_lists")

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


class Role(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 disable_notifications: Optional[pulumi.Input[bool]] = None,
                 group_id: Optional[pulumi.Input[str]] = None,
                 role_type: Optional[pulumi.Input[str]] = None,
                 target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 __props__=None):
        """
        Create a Role 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[bool] disable_notifications: When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        :param pulumi.Input[str] group_id: ID of group to attach admin roles to
        :param pulumi.Input[str] role_type: Type of Role to assign
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_app_lists: List of apps ids for the targets of the admin role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_group_lists: List of groups ids for the targets of the admin role.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RoleArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a Role resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param RoleArgs 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(RoleArgs, 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
            RoleArgs._configure(_setter, **kwargs)
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 disable_notifications: Optional[pulumi.Input[bool]] = None,
                 group_id: Optional[pulumi.Input[str]] = None,
                 role_type: Optional[pulumi.Input[str]] = None,
                 target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[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__ = RoleArgs.__new__(RoleArgs)

            __props__.__dict__["disable_notifications"] = disable_notifications
            if group_id is None and not opts.urn:
                raise TypeError("Missing required property 'group_id'")
            __props__.__dict__["group_id"] = group_id
            if role_type is None and not opts.urn:
                raise TypeError("Missing required property 'role_type'")
            __props__.__dict__["role_type"] = role_type
            __props__.__dict__["target_app_lists"] = target_app_lists
            __props__.__dict__["target_group_lists"] = target_group_lists
        super(Role, __self__).__init__(
            'okta:group/role:Role',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            disable_notifications: Optional[pulumi.Input[bool]] = None,
            group_id: Optional[pulumi.Input[str]] = None,
            role_type: Optional[pulumi.Input[str]] = None,
            target_app_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            target_group_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Role':
        """
        Get an existing Role 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[bool] disable_notifications: When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        :param pulumi.Input[str] group_id: ID of group to attach admin roles to
        :param pulumi.Input[str] role_type: Type of Role to assign
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_app_lists: List of apps ids for the targets of the admin role.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] target_group_lists: List of groups ids for the targets of the admin role.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RoleState.__new__(_RoleState)

        __props__.__dict__["disable_notifications"] = disable_notifications
        __props__.__dict__["group_id"] = group_id
        __props__.__dict__["role_type"] = role_type
        __props__.__dict__["target_app_lists"] = target_app_lists
        __props__.__dict__["target_group_lists"] = target_group_lists
        return Role(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="disableNotifications")
    def disable_notifications(self) -> pulumi.Output[Optional[bool]]:
        """
        When this setting is enabled, the admins won't receive any of the default Okta administrator emails
        """
        return pulumi.get(self, "disable_notifications")

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> pulumi.Output[str]:
        """
        ID of group to attach admin roles to
        """
        return pulumi.get(self, "group_id")

    @property
    @pulumi.getter(name="roleType")
    def role_type(self) -> pulumi.Output[str]:
        """
        Type of Role to assign
        """
        return pulumi.get(self, "role_type")

    @property
    @pulumi.getter(name="targetAppLists")
    def target_app_lists(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        List of apps ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_app_lists")

    @property
    @pulumi.getter(name="targetGroupLists")
    def target_group_lists(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        List of groups ids for the targets of the admin role.
        """
        return pulumi.get(self, "target_group_lists")

