# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__ = ['RealmLocalizationArgs', 'RealmLocalization']

@pulumi.input_type
class RealmLocalizationArgs:
    def __init__(__self__, *,
                 locale: pulumi.Input[_builtins.str],
                 realm_id: pulumi.Input[_builtins.str],
                 texts: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None):
        """
        The set of arguments for constructing a RealmLocalization resource.
        :param pulumi.Input[_builtins.str] locale: The locale for the localization texts.
        :param pulumi.Input[_builtins.str] realm_id: The realm in which the texts exists.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] texts: The mapping of localization texts keys to values.
        """
        pulumi.set(__self__, "locale", locale)
        pulumi.set(__self__, "realm_id", realm_id)
        if texts is not None:
            pulumi.set(__self__, "texts", texts)

    @_builtins.property
    @pulumi.getter
    def locale(self) -> pulumi.Input[_builtins.str]:
        """
        The locale for the localization texts.
        """
        return pulumi.get(self, "locale")

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

    @_builtins.property
    @pulumi.getter(name="realmId")
    def realm_id(self) -> pulumi.Input[_builtins.str]:
        """
        The realm in which the texts exists.
        """
        return pulumi.get(self, "realm_id")

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

    @_builtins.property
    @pulumi.getter
    def texts(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        The mapping of localization texts keys to values.
        """
        return pulumi.get(self, "texts")

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


@pulumi.input_type
class _RealmLocalizationState:
    def __init__(__self__, *,
                 locale: Optional[pulumi.Input[_builtins.str]] = None,
                 realm_id: Optional[pulumi.Input[_builtins.str]] = None,
                 texts: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None):
        """
        Input properties used for looking up and filtering RealmLocalization resources.
        :param pulumi.Input[_builtins.str] locale: The locale for the localization texts.
        :param pulumi.Input[_builtins.str] realm_id: The realm in which the texts exists.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] texts: The mapping of localization texts keys to values.
        """
        if locale is not None:
            pulumi.set(__self__, "locale", locale)
        if realm_id is not None:
            pulumi.set(__self__, "realm_id", realm_id)
        if texts is not None:
            pulumi.set(__self__, "texts", texts)

    @_builtins.property
    @pulumi.getter
    def locale(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The locale for the localization texts.
        """
        return pulumi.get(self, "locale")

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

    @_builtins.property
    @pulumi.getter(name="realmId")
    def realm_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The realm in which the texts exists.
        """
        return pulumi.get(self, "realm_id")

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

    @_builtins.property
    @pulumi.getter
    def texts(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
        """
        The mapping of localization texts keys to values.
        """
        return pulumi.get(self, "texts")

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


@pulumi.type_token("keycloak:index/realmLocalization:RealmLocalization")
class RealmLocalization(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 locale: Optional[pulumi.Input[_builtins.str]] = None,
                 realm_id: Optional[pulumi.Input[_builtins.str]] = None,
                 texts: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 __props__=None):
        """
        Create a RealmLocalization 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[_builtins.str] locale: The locale for the localization texts.
        :param pulumi.Input[_builtins.str] realm_id: The realm in which the texts exists.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] texts: The mapping of localization texts keys to values.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RealmLocalizationArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a RealmLocalization resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param RealmLocalizationArgs 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(RealmLocalizationArgs, 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,
                 locale: Optional[pulumi.Input[_builtins.str]] = None,
                 realm_id: Optional[pulumi.Input[_builtins.str]] = None,
                 texts: Optional[pulumi.Input[Mapping[str, 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__ = RealmLocalizationArgs.__new__(RealmLocalizationArgs)

            if locale is None and not opts.urn:
                raise TypeError("Missing required property 'locale'")
            __props__.__dict__["locale"] = locale
            if realm_id is None and not opts.urn:
                raise TypeError("Missing required property 'realm_id'")
            __props__.__dict__["realm_id"] = realm_id
            __props__.__dict__["texts"] = texts
        super(RealmLocalization, __self__).__init__(
            'keycloak:index/realmLocalization:RealmLocalization',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            locale: Optional[pulumi.Input[_builtins.str]] = None,
            realm_id: Optional[pulumi.Input[_builtins.str]] = None,
            texts: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None) -> 'RealmLocalization':
        """
        Get an existing RealmLocalization 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.str] locale: The locale for the localization texts.
        :param pulumi.Input[_builtins.str] realm_id: The realm in which the texts exists.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] texts: The mapping of localization texts keys to values.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RealmLocalizationState.__new__(_RealmLocalizationState)

        __props__.__dict__["locale"] = locale
        __props__.__dict__["realm_id"] = realm_id
        __props__.__dict__["texts"] = texts
        return RealmLocalization(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def locale(self) -> pulumi.Output[_builtins.str]:
        """
        The locale for the localization texts.
        """
        return pulumi.get(self, "locale")

    @_builtins.property
    @pulumi.getter(name="realmId")
    def realm_id(self) -> pulumi.Output[_builtins.str]:
        """
        The realm in which the texts exists.
        """
        return pulumi.get(self, "realm_id")

    @_builtins.property
    @pulumi.getter
    def texts(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
        """
        The mapping of localization texts keys to values.
        """
        return pulumi.get(self, "texts")

