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

__all__ = [
    'GetCentralNotificationRuleResult',
    'AwaitableGetCentralNotificationRuleResult',
    'get_central_notification_rule',
    'get_central_notification_rule_output',
]

@pulumi.output_type
class GetCentralNotificationRuleResult:
    """
    A collection of values returned by getCentralNotificationRule.
    """
    def __init__(__self__, account=None, created=None, custom_notification_template_ref=None, id=None, identifier=None, last_modified=None, name=None, notification_channel_refs=None, notification_conditions=None, org=None, project=None, status=None):
        if account and not isinstance(account, str):
            raise TypeError("Expected argument 'account' to be a str")
        pulumi.set(__self__, "account", account)
        if created and not isinstance(created, int):
            raise TypeError("Expected argument 'created' to be a int")
        pulumi.set(__self__, "created", created)
        if custom_notification_template_ref and not isinstance(custom_notification_template_ref, dict):
            raise TypeError("Expected argument 'custom_notification_template_ref' to be a dict")
        pulumi.set(__self__, "custom_notification_template_ref", custom_notification_template_ref)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if identifier and not isinstance(identifier, str):
            raise TypeError("Expected argument 'identifier' to be a str")
        pulumi.set(__self__, "identifier", identifier)
        if last_modified and not isinstance(last_modified, int):
            raise TypeError("Expected argument 'last_modified' to be a int")
        pulumi.set(__self__, "last_modified", last_modified)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if notification_channel_refs and not isinstance(notification_channel_refs, list):
            raise TypeError("Expected argument 'notification_channel_refs' to be a list")
        pulumi.set(__self__, "notification_channel_refs", notification_channel_refs)
        if notification_conditions and not isinstance(notification_conditions, list):
            raise TypeError("Expected argument 'notification_conditions' to be a list")
        pulumi.set(__self__, "notification_conditions", notification_conditions)
        if org and not isinstance(org, str):
            raise TypeError("Expected argument 'org' to be a str")
        pulumi.set(__self__, "org", org)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

    @_builtins.property
    @pulumi.getter
    def account(self) -> _builtins.str:
        """
        Account identifier associated with this notification channel.
        """
        return pulumi.get(self, "account")

    @_builtins.property
    @pulumi.getter
    def created(self) -> _builtins.int:
        """
        Timestamp when the notification rule was created.
        """
        return pulumi.get(self, "created")

    @_builtins.property
    @pulumi.getter(name="customNotificationTemplateRef")
    def custom_notification_template_ref(self) -> Optional['outputs.GetCentralNotificationRuleCustomNotificationTemplateRefResult']:
        return pulumi.get(self, "custom_notification_template_ref")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def identifier(self) -> _builtins.str:
        """
        Identifier of the Notification Rule.
        """
        return pulumi.get(self, "identifier")

    @_builtins.property
    @pulumi.getter(name="lastModified")
    def last_modified(self) -> _builtins.int:
        """
        Timestamp when the notification rule was last modified.
        """
        return pulumi.get(self, "last_modified")

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

    @_builtins.property
    @pulumi.getter(name="notificationChannelRefs")
    def notification_channel_refs(self) -> Optional[Sequence[_builtins.str]]:
        return pulumi.get(self, "notification_channel_refs")

    @_builtins.property
    @pulumi.getter(name="notificationConditions")
    def notification_conditions(self) -> Optional[Sequence['outputs.GetCentralNotificationRuleNotificationConditionResult']]:
        return pulumi.get(self, "notification_conditions")

    @_builtins.property
    @pulumi.getter
    def org(self) -> Optional[_builtins.str]:
        """
        Identifier of the organization in which the Notification Rule is configured.
        """
        return pulumi.get(self, "org")

    @_builtins.property
    @pulumi.getter
    def project(self) -> Optional[_builtins.str]:
        """
        Identifier of the project in which the Notification Rule is configured.
        """
        return pulumi.get(self, "project")

    @_builtins.property
    @pulumi.getter
    def status(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "status")


class AwaitableGetCentralNotificationRuleResult(GetCentralNotificationRuleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCentralNotificationRuleResult(
            account=self.account,
            created=self.created,
            custom_notification_template_ref=self.custom_notification_template_ref,
            id=self.id,
            identifier=self.identifier,
            last_modified=self.last_modified,
            name=self.name,
            notification_channel_refs=self.notification_channel_refs,
            notification_conditions=self.notification_conditions,
            org=self.org,
            project=self.project,
            status=self.status)


def get_central_notification_rule(custom_notification_template_ref: Optional[Union['GetCentralNotificationRuleCustomNotificationTemplateRefArgs', 'GetCentralNotificationRuleCustomNotificationTemplateRefArgsDict']] = None,
                                  identifier: Optional[_builtins.str] = None,
                                  name: Optional[_builtins.str] = None,
                                  notification_channel_refs: Optional[Sequence[_builtins.str]] = None,
                                  notification_conditions: Optional[Sequence[Union['GetCentralNotificationRuleNotificationConditionArgs', 'GetCentralNotificationRuleNotificationConditionArgsDict']]] = None,
                                  org: Optional[_builtins.str] = None,
                                  project: Optional[_builtins.str] = None,
                                  status: Optional[_builtins.str] = None,
                                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCentralNotificationRuleResult:
    """
    > Deprecated: Please use `data.harness_platform_pipeline_central_notification_rule`. See the pipeline-specific data source docs.

    Data source for retrieving a Notification Rule.


    :param _builtins.str identifier: Identifier of the Notification Rule.
    :param _builtins.str org: Identifier of the organization in which the Notification Rule is configured.
    :param _builtins.str project: Identifier of the project in which the Notification Rule is configured.
    """
    __args__ = dict()
    __args__['customNotificationTemplateRef'] = custom_notification_template_ref
    __args__['identifier'] = identifier
    __args__['name'] = name
    __args__['notificationChannelRefs'] = notification_channel_refs
    __args__['notificationConditions'] = notification_conditions
    __args__['org'] = org
    __args__['project'] = project
    __args__['status'] = status
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('harness:platform/getCentralNotificationRule:getCentralNotificationRule', __args__, opts=opts, typ=GetCentralNotificationRuleResult).value

    return AwaitableGetCentralNotificationRuleResult(
        account=pulumi.get(__ret__, 'account'),
        created=pulumi.get(__ret__, 'created'),
        custom_notification_template_ref=pulumi.get(__ret__, 'custom_notification_template_ref'),
        id=pulumi.get(__ret__, 'id'),
        identifier=pulumi.get(__ret__, 'identifier'),
        last_modified=pulumi.get(__ret__, 'last_modified'),
        name=pulumi.get(__ret__, 'name'),
        notification_channel_refs=pulumi.get(__ret__, 'notification_channel_refs'),
        notification_conditions=pulumi.get(__ret__, 'notification_conditions'),
        org=pulumi.get(__ret__, 'org'),
        project=pulumi.get(__ret__, 'project'),
        status=pulumi.get(__ret__, 'status'))
def get_central_notification_rule_output(custom_notification_template_ref: Optional[pulumi.Input[Optional[Union['GetCentralNotificationRuleCustomNotificationTemplateRefArgs', 'GetCentralNotificationRuleCustomNotificationTemplateRefArgsDict']]]] = None,
                                         identifier: Optional[pulumi.Input[_builtins.str]] = None,
                                         name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                         notification_channel_refs: Optional[pulumi.Input[Optional[Sequence[_builtins.str]]]] = None,
                                         notification_conditions: Optional[pulumi.Input[Optional[Sequence[Union['GetCentralNotificationRuleNotificationConditionArgs', 'GetCentralNotificationRuleNotificationConditionArgsDict']]]]] = None,
                                         org: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                         project: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                         status: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                         opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCentralNotificationRuleResult]:
    """
    > Deprecated: Please use `data.harness_platform_pipeline_central_notification_rule`. See the pipeline-specific data source docs.

    Data source for retrieving a Notification Rule.


    :param _builtins.str identifier: Identifier of the Notification Rule.
    :param _builtins.str org: Identifier of the organization in which the Notification Rule is configured.
    :param _builtins.str project: Identifier of the project in which the Notification Rule is configured.
    """
    __args__ = dict()
    __args__['customNotificationTemplateRef'] = custom_notification_template_ref
    __args__['identifier'] = identifier
    __args__['name'] = name
    __args__['notificationChannelRefs'] = notification_channel_refs
    __args__['notificationConditions'] = notification_conditions
    __args__['org'] = org
    __args__['project'] = project
    __args__['status'] = status
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('harness:platform/getCentralNotificationRule:getCentralNotificationRule', __args__, opts=opts, typ=GetCentralNotificationRuleResult)
    return __ret__.apply(lambda __response__: GetCentralNotificationRuleResult(
        account=pulumi.get(__response__, 'account'),
        created=pulumi.get(__response__, 'created'),
        custom_notification_template_ref=pulumi.get(__response__, 'custom_notification_template_ref'),
        id=pulumi.get(__response__, 'id'),
        identifier=pulumi.get(__response__, 'identifier'),
        last_modified=pulumi.get(__response__, 'last_modified'),
        name=pulumi.get(__response__, 'name'),
        notification_channel_refs=pulumi.get(__response__, 'notification_channel_refs'),
        notification_conditions=pulumi.get(__response__, 'notification_conditions'),
        org=pulumi.get(__response__, 'org'),
        project=pulumi.get(__response__, 'project'),
        status=pulumi.get(__response__, 'status')))
