# 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, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['GroupPermissionsArgs', 'GroupPermissions']

@pulumi.input_type
class GroupPermissionsArgs:
    def __init__(__self__, *,
                 group_id: pulumi.Input[str],
                 realm_id: pulumi.Input[str],
                 manage_members_scope: Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']] = None,
                 manage_membership_scope: Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']] = None,
                 manage_scope: Optional[pulumi.Input['GroupPermissionsManageScopeArgs']] = None,
                 view_members_scope: Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']] = None,
                 view_scope: Optional[pulumi.Input['GroupPermissionsViewScopeArgs']] = None):
        """
        The set of arguments for constructing a GroupPermissions resource.
        """
        pulumi.set(__self__, "group_id", group_id)
        pulumi.set(__self__, "realm_id", realm_id)
        if manage_members_scope is not None:
            pulumi.set(__self__, "manage_members_scope", manage_members_scope)
        if manage_membership_scope is not None:
            pulumi.set(__self__, "manage_membership_scope", manage_membership_scope)
        if manage_scope is not None:
            pulumi.set(__self__, "manage_scope", manage_scope)
        if view_members_scope is not None:
            pulumi.set(__self__, "view_members_scope", view_members_scope)
        if view_scope is not None:
            pulumi.set(__self__, "view_scope", view_scope)

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> pulumi.Input[str]:
        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="realmId")
    def realm_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "realm_id")

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

    @property
    @pulumi.getter(name="manageMembersScope")
    def manage_members_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']]:
        return pulumi.get(self, "manage_members_scope")

    @manage_members_scope.setter
    def manage_members_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']]):
        pulumi.set(self, "manage_members_scope", value)

    @property
    @pulumi.getter(name="manageMembershipScope")
    def manage_membership_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']]:
        return pulumi.get(self, "manage_membership_scope")

    @manage_membership_scope.setter
    def manage_membership_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']]):
        pulumi.set(self, "manage_membership_scope", value)

    @property
    @pulumi.getter(name="manageScope")
    def manage_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageScopeArgs']]:
        return pulumi.get(self, "manage_scope")

    @manage_scope.setter
    def manage_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageScopeArgs']]):
        pulumi.set(self, "manage_scope", value)

    @property
    @pulumi.getter(name="viewMembersScope")
    def view_members_scope(self) -> Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']]:
        return pulumi.get(self, "view_members_scope")

    @view_members_scope.setter
    def view_members_scope(self, value: Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']]):
        pulumi.set(self, "view_members_scope", value)

    @property
    @pulumi.getter(name="viewScope")
    def view_scope(self) -> Optional[pulumi.Input['GroupPermissionsViewScopeArgs']]:
        return pulumi.get(self, "view_scope")

    @view_scope.setter
    def view_scope(self, value: Optional[pulumi.Input['GroupPermissionsViewScopeArgs']]):
        pulumi.set(self, "view_scope", value)


@pulumi.input_type
class _GroupPermissionsState:
    def __init__(__self__, *,
                 authorization_resource_server_id: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 group_id: Optional[pulumi.Input[str]] = None,
                 manage_members_scope: Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']] = None,
                 manage_membership_scope: Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']] = None,
                 manage_scope: Optional[pulumi.Input['GroupPermissionsManageScopeArgs']] = None,
                 realm_id: Optional[pulumi.Input[str]] = None,
                 view_members_scope: Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']] = None,
                 view_scope: Optional[pulumi.Input['GroupPermissionsViewScopeArgs']] = None):
        """
        Input properties used for looking up and filtering GroupPermissions resources.
        :param pulumi.Input[str] authorization_resource_server_id: Resource server id representing the realm management client on which this permission is managed
        """
        if authorization_resource_server_id is not None:
            pulumi.set(__self__, "authorization_resource_server_id", authorization_resource_server_id)
        if enabled is not None:
            pulumi.set(__self__, "enabled", enabled)
        if group_id is not None:
            pulumi.set(__self__, "group_id", group_id)
        if manage_members_scope is not None:
            pulumi.set(__self__, "manage_members_scope", manage_members_scope)
        if manage_membership_scope is not None:
            pulumi.set(__self__, "manage_membership_scope", manage_membership_scope)
        if manage_scope is not None:
            pulumi.set(__self__, "manage_scope", manage_scope)
        if realm_id is not None:
            pulumi.set(__self__, "realm_id", realm_id)
        if view_members_scope is not None:
            pulumi.set(__self__, "view_members_scope", view_members_scope)
        if view_scope is not None:
            pulumi.set(__self__, "view_scope", view_scope)

    @property
    @pulumi.getter(name="authorizationResourceServerId")
    def authorization_resource_server_id(self) -> Optional[pulumi.Input[str]]:
        """
        Resource server id representing the realm management client on which this permission is managed
        """
        return pulumi.get(self, "authorization_resource_server_id")

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

    @property
    @pulumi.getter
    def enabled(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "enabled")

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

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> Optional[pulumi.Input[str]]:
        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="manageMembersScope")
    def manage_members_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']]:
        return pulumi.get(self, "manage_members_scope")

    @manage_members_scope.setter
    def manage_members_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageMembersScopeArgs']]):
        pulumi.set(self, "manage_members_scope", value)

    @property
    @pulumi.getter(name="manageMembershipScope")
    def manage_membership_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']]:
        return pulumi.get(self, "manage_membership_scope")

    @manage_membership_scope.setter
    def manage_membership_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageMembershipScopeArgs']]):
        pulumi.set(self, "manage_membership_scope", value)

    @property
    @pulumi.getter(name="manageScope")
    def manage_scope(self) -> Optional[pulumi.Input['GroupPermissionsManageScopeArgs']]:
        return pulumi.get(self, "manage_scope")

    @manage_scope.setter
    def manage_scope(self, value: Optional[pulumi.Input['GroupPermissionsManageScopeArgs']]):
        pulumi.set(self, "manage_scope", value)

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

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

    @property
    @pulumi.getter(name="viewMembersScope")
    def view_members_scope(self) -> Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']]:
        return pulumi.get(self, "view_members_scope")

    @view_members_scope.setter
    def view_members_scope(self, value: Optional[pulumi.Input['GroupPermissionsViewMembersScopeArgs']]):
        pulumi.set(self, "view_members_scope", value)

    @property
    @pulumi.getter(name="viewScope")
    def view_scope(self) -> Optional[pulumi.Input['GroupPermissionsViewScopeArgs']]:
        return pulumi.get(self, "view_scope")

    @view_scope.setter
    def view_scope(self, value: Optional[pulumi.Input['GroupPermissionsViewScopeArgs']]):
        pulumi.set(self, "view_scope", value)


class GroupPermissions(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 group_id: Optional[pulumi.Input[str]] = None,
                 manage_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembersScopeArgs']]] = None,
                 manage_membership_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembershipScopeArgs']]] = None,
                 manage_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageScopeArgs']]] = None,
                 realm_id: Optional[pulumi.Input[str]] = None,
                 view_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewMembersScopeArgs']]] = None,
                 view_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewScopeArgs']]] = None,
                 __props__=None):
        """
        Create a GroupPermissions 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.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GroupPermissionsArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a GroupPermissions resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param GroupPermissionsArgs 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(GroupPermissionsArgs, 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,
                 group_id: Optional[pulumi.Input[str]] = None,
                 manage_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembersScopeArgs']]] = None,
                 manage_membership_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembershipScopeArgs']]] = None,
                 manage_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageScopeArgs']]] = None,
                 realm_id: Optional[pulumi.Input[str]] = None,
                 view_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewMembersScopeArgs']]] = None,
                 view_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewScopeArgs']]] = None,
                 __props__=None):
        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__ = GroupPermissionsArgs.__new__(GroupPermissionsArgs)

            if group_id is None and not opts.urn:
                raise TypeError("Missing required property 'group_id'")
            __props__.__dict__["group_id"] = group_id
            __props__.__dict__["manage_members_scope"] = manage_members_scope
            __props__.__dict__["manage_membership_scope"] = manage_membership_scope
            __props__.__dict__["manage_scope"] = manage_scope
            if realm_id is None and not opts.urn:
                raise TypeError("Missing required property 'realm_id'")
            __props__.__dict__["realm_id"] = realm_id
            __props__.__dict__["view_members_scope"] = view_members_scope
            __props__.__dict__["view_scope"] = view_scope
            __props__.__dict__["authorization_resource_server_id"] = None
            __props__.__dict__["enabled"] = None
        super(GroupPermissions, __self__).__init__(
            'keycloak:index/groupPermissions:GroupPermissions',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            authorization_resource_server_id: Optional[pulumi.Input[str]] = None,
            enabled: Optional[pulumi.Input[bool]] = None,
            group_id: Optional[pulumi.Input[str]] = None,
            manage_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembersScopeArgs']]] = None,
            manage_membership_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageMembershipScopeArgs']]] = None,
            manage_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsManageScopeArgs']]] = None,
            realm_id: Optional[pulumi.Input[str]] = None,
            view_members_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewMembersScopeArgs']]] = None,
            view_scope: Optional[pulumi.Input[pulumi.InputType['GroupPermissionsViewScopeArgs']]] = None) -> 'GroupPermissions':
        """
        Get an existing GroupPermissions 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] authorization_resource_server_id: Resource server id representing the realm management client on which this permission is managed
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _GroupPermissionsState.__new__(_GroupPermissionsState)

        __props__.__dict__["authorization_resource_server_id"] = authorization_resource_server_id
        __props__.__dict__["enabled"] = enabled
        __props__.__dict__["group_id"] = group_id
        __props__.__dict__["manage_members_scope"] = manage_members_scope
        __props__.__dict__["manage_membership_scope"] = manage_membership_scope
        __props__.__dict__["manage_scope"] = manage_scope
        __props__.__dict__["realm_id"] = realm_id
        __props__.__dict__["view_members_scope"] = view_members_scope
        __props__.__dict__["view_scope"] = view_scope
        return GroupPermissions(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="authorizationResourceServerId")
    def authorization_resource_server_id(self) -> pulumi.Output[str]:
        """
        Resource server id representing the realm management client on which this permission is managed
        """
        return pulumi.get(self, "authorization_resource_server_id")

    @property
    @pulumi.getter
    def enabled(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "enabled")

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

    @property
    @pulumi.getter(name="manageMembersScope")
    def manage_members_scope(self) -> pulumi.Output[Optional['outputs.GroupPermissionsManageMembersScope']]:
        return pulumi.get(self, "manage_members_scope")

    @property
    @pulumi.getter(name="manageMembershipScope")
    def manage_membership_scope(self) -> pulumi.Output[Optional['outputs.GroupPermissionsManageMembershipScope']]:
        return pulumi.get(self, "manage_membership_scope")

    @property
    @pulumi.getter(name="manageScope")
    def manage_scope(self) -> pulumi.Output[Optional['outputs.GroupPermissionsManageScope']]:
        return pulumi.get(self, "manage_scope")

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

    @property
    @pulumi.getter(name="viewMembersScope")
    def view_members_scope(self) -> pulumi.Output[Optional['outputs.GroupPermissionsViewMembersScope']]:
        return pulumi.get(self, "view_members_scope")

    @property
    @pulumi.getter(name="viewScope")
    def view_scope(self) -> pulumi.Output[Optional['outputs.GroupPermissionsViewScope']]:
        return pulumi.get(self, "view_scope")

