# 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__ = [
    'TopicAccessPolicy',
    'TopicTag',
    'GetTopicAccessPolicyResult',
    'GetTopicTagResult',
]

@pulumi.output_type
class TopicAccessPolicy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "accessPolicy":
            suggest = "access_policy"
        elif key == "userName":
            suggest = "user_name"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in TopicAccessPolicy. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        TopicAccessPolicy.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        TopicAccessPolicy.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 access_policy: Optional[builtins.str] = None,
                 user_name: Optional[builtins.str] = None):
        """
        :param builtins.str access_policy: SASL 用户对于当前 Topic 的访问权限。PubSub：拥有发布、订阅权限。Pub：拥有发布权限。Sub：拥有订阅权限。
        :param builtins.str user_name: SASL 用户名称。
        """
        if access_policy is not None:
            pulumi.set(__self__, "access_policy", access_policy)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)

    @property
    @pulumi.getter(name="accessPolicy")
    def access_policy(self) -> Optional[builtins.str]:
        """
        SASL 用户对于当前 Topic 的访问权限。PubSub：拥有发布、订阅权限。Pub：拥有发布权限。Sub：拥有订阅权限。
        """
        return pulumi.get(self, "access_policy")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> Optional[builtins.str]:
        """
        SASL 用户名称。
        """
        return pulumi.get(self, "user_name")


@pulumi.output_type
class TopicTag(dict):
    def __init__(__self__, *,
                 key: Optional[builtins.str] = None,
                 value: Optional[builtins.str] = None):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        if key is not None:
            pulumi.set(__self__, "key", key)
        if value is not None:
            pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> Optional[builtins.str]:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> Optional[builtins.str]:
        """
        标签值。
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class GetTopicAccessPolicyResult(dict):
    def __init__(__self__, *,
                 access_policy: builtins.str,
                 user_name: builtins.str):
        """
        :param builtins.str access_policy: SASL 用户对于当前 Topic 的访问权限。PubSub：拥有发布、订阅权限。Pub：拥有发布权限。Sub：拥有订阅权限。
        :param builtins.str user_name: SASL 用户名称。
        """
        pulumi.set(__self__, "access_policy", access_policy)
        pulumi.set(__self__, "user_name", user_name)

    @property
    @pulumi.getter(name="accessPolicy")
    def access_policy(self) -> builtins.str:
        """
        SASL 用户对于当前 Topic 的访问权限。PubSub：拥有发布、订阅权限。Pub：拥有发布权限。Sub：拥有订阅权限。
        """
        return pulumi.get(self, "access_policy")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        SASL 用户名称。
        """
        return pulumi.get(self, "user_name")


@pulumi.output_type
class GetTopicTagResult(dict):
    def __init__(__self__, *,
                 key: builtins.str,
                 value: builtins.str):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> builtins.str:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> builtins.str:
        """
        标签值。
        """
        return pulumi.get(self, "value")


