# 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 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

__all__ = [
    'JobJobMonitorInfo',
    'JobJobMonitorInfoContactInfo',
    'JobJobMonitorInfoMonitorConfig',
    'JobMapTaskXattrs',
    'JobTimeConfig',
    'GetNamespacesNamespaceResult',
]

@pulumi.output_type
class JobJobMonitorInfo(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "contactInfos":
            suggest = "contact_infos"
        elif key == "monitorConfig":
            suggest = "monitor_config"

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

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

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

    def __init__(__self__, *,
                 contact_infos: Optional[Sequence['outputs.JobJobMonitorInfoContactInfo']] = None,
                 monitor_config: Optional['outputs.JobJobMonitorInfoMonitorConfig'] = None):
        """
        :param Sequence['JobJobMonitorInfoContactInfoArgs'] contact_infos: Contact information. See `contact_info` below.
        :param 'JobJobMonitorInfoMonitorConfigArgs' monitor_config: Alarm switch and threshold configuration. See `monitor_config` below.
        """
        if contact_infos is not None:
            pulumi.set(__self__, "contact_infos", contact_infos)
        if monitor_config is not None:
            pulumi.set(__self__, "monitor_config", monitor_config)

    @property
    @pulumi.getter(name="contactInfos")
    def contact_infos(self) -> Optional[Sequence['outputs.JobJobMonitorInfoContactInfo']]:
        """
        Contact information. See `contact_info` below.
        """
        return pulumi.get(self, "contact_infos")

    @property
    @pulumi.getter(name="monitorConfig")
    def monitor_config(self) -> Optional['outputs.JobJobMonitorInfoMonitorConfig']:
        """
        Alarm switch and threshold configuration. See `monitor_config` below.
        """
        return pulumi.get(self, "monitor_config")


@pulumi.output_type
class JobJobMonitorInfoContactInfo(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "userMail":
            suggest = "user_mail"
        elif key == "userName":
            suggest = "user_name"
        elif key == "userPhone":
            suggest = "user_phone"

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

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

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

    def __init__(__self__, *,
                 ding: Optional[str] = None,
                 user_mail: Optional[str] = None,
                 user_name: Optional[str] = None,
                 user_phone: Optional[str] = None):
        """
        :param str ding: DingTalk swarm robot webhook address
        :param str user_mail: User Email Address
        :param str user_name: The user name
        :param str user_phone: The user's mobile phone number
        """
        if ding is not None:
            pulumi.set(__self__, "ding", ding)
        if user_mail is not None:
            pulumi.set(__self__, "user_mail", user_mail)
        if user_name is not None:
            pulumi.set(__self__, "user_name", user_name)
        if user_phone is not None:
            pulumi.set(__self__, "user_phone", user_phone)

    @property
    @pulumi.getter
    def ding(self) -> Optional[str]:
        """
        DingTalk swarm robot webhook address
        """
        return pulumi.get(self, "ding")

    @property
    @pulumi.getter(name="userMail")
    def user_mail(self) -> Optional[str]:
        """
        User Email Address
        """
        return pulumi.get(self, "user_mail")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> Optional[str]:
        """
        The user name
        """
        return pulumi.get(self, "user_name")

    @property
    @pulumi.getter(name="userPhone")
    def user_phone(self) -> Optional[str]:
        """
        The user's mobile phone number
        """
        return pulumi.get(self, "user_phone")


@pulumi.output_type
class JobJobMonitorInfoMonitorConfig(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "failEnable":
            suggest = "fail_enable"
        elif key == "missWorkerEnable":
            suggest = "miss_worker_enable"
        elif key == "sendChannel":
            suggest = "send_channel"
        elif key == "timeoutEnable":
            suggest = "timeout_enable"
        elif key == "timeoutKillEnable":
            suggest = "timeout_kill_enable"

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

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

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

    def __init__(__self__, *,
                 fail_enable: Optional[bool] = None,
                 miss_worker_enable: Optional[bool] = None,
                 send_channel: Optional[str] = None,
                 timeout: Optional[int] = None,
                 timeout_enable: Optional[bool] = None,
                 timeout_kill_enable: Optional[bool] = None):
        """
        :param bool fail_enable: Enable failure alarm
        :param bool miss_worker_enable: Whether no available Machine alarm is on
        :param str send_channel: Alarm sending form
               - sms: sms alarm
               - phone: phone alarm
               - mail: mail alarm
               - webhook:webhook alarm
        :param int timeout: Timeout threshold, unit s, default 7200.
        :param bool timeout_enable: Time-out alarm switch. The values are as follows:
        :param bool timeout_kill_enable: The trigger switch is terminated by timeout and is turned off by default.
        """
        if fail_enable is not None:
            pulumi.set(__self__, "fail_enable", fail_enable)
        if miss_worker_enable is not None:
            pulumi.set(__self__, "miss_worker_enable", miss_worker_enable)
        if send_channel is not None:
            pulumi.set(__self__, "send_channel", send_channel)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)
        if timeout_enable is not None:
            pulumi.set(__self__, "timeout_enable", timeout_enable)
        if timeout_kill_enable is not None:
            pulumi.set(__self__, "timeout_kill_enable", timeout_kill_enable)

    @property
    @pulumi.getter(name="failEnable")
    def fail_enable(self) -> Optional[bool]:
        """
        Enable failure alarm
        """
        return pulumi.get(self, "fail_enable")

    @property
    @pulumi.getter(name="missWorkerEnable")
    def miss_worker_enable(self) -> Optional[bool]:
        """
        Whether no available Machine alarm is on
        """
        return pulumi.get(self, "miss_worker_enable")

    @property
    @pulumi.getter(name="sendChannel")
    def send_channel(self) -> Optional[str]:
        """
        Alarm sending form
        - sms: sms alarm
        - phone: phone alarm
        - mail: mail alarm
        - webhook:webhook alarm
        """
        return pulumi.get(self, "send_channel")

    @property
    @pulumi.getter
    def timeout(self) -> Optional[int]:
        """
        Timeout threshold, unit s, default 7200.
        """
        return pulumi.get(self, "timeout")

    @property
    @pulumi.getter(name="timeoutEnable")
    def timeout_enable(self) -> Optional[bool]:
        """
        Time-out alarm switch. The values are as follows:
        """
        return pulumi.get(self, "timeout_enable")

    @property
    @pulumi.getter(name="timeoutKillEnable")
    def timeout_kill_enable(self) -> Optional[bool]:
        """
        The trigger switch is terminated by timeout and is turned off by default.
        """
        return pulumi.get(self, "timeout_kill_enable")


@pulumi.output_type
class JobMapTaskXattrs(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "consumerSize":
            suggest = "consumer_size"
        elif key == "dispatcherSize":
            suggest = "dispatcher_size"
        elif key == "pageSize":
            suggest = "page_size"
        elif key == "queueSize":
            suggest = "queue_size"
        elif key == "taskAttemptInterval":
            suggest = "task_attempt_interval"
        elif key == "taskMaxAttempt":
            suggest = "task_max_attempt"

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

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

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

    def __init__(__self__, *,
                 consumer_size: Optional[int] = None,
                 dispatcher_size: Optional[int] = None,
                 page_size: Optional[int] = None,
                 queue_size: Optional[int] = None,
                 task_attempt_interval: Optional[int] = None,
                 task_max_attempt: Optional[int] = None):
        """
        :param int consumer_size: The number of threads to execute a single trigger. The default value is 5.
        :param int dispatcher_size: The number of subtask distribution threads. The default value is 5.
        :param int page_size: The number of sub-tasks pulled by a parallel task at a time. The default value is 100.
        :param int queue_size: The upper limit of the sub-task queue cache. The default value is 10000.
        :param int task_attempt_interval: Subtask failure retry interval.
        :param int task_max_attempt: The number of failed sub-task retries.
        """
        if consumer_size is not None:
            pulumi.set(__self__, "consumer_size", consumer_size)
        if dispatcher_size is not None:
            pulumi.set(__self__, "dispatcher_size", dispatcher_size)
        if page_size is not None:
            pulumi.set(__self__, "page_size", page_size)
        if queue_size is not None:
            pulumi.set(__self__, "queue_size", queue_size)
        if task_attempt_interval is not None:
            pulumi.set(__self__, "task_attempt_interval", task_attempt_interval)
        if task_max_attempt is not None:
            pulumi.set(__self__, "task_max_attempt", task_max_attempt)

    @property
    @pulumi.getter(name="consumerSize")
    def consumer_size(self) -> Optional[int]:
        """
        The number of threads to execute a single trigger. The default value is 5.
        """
        return pulumi.get(self, "consumer_size")

    @property
    @pulumi.getter(name="dispatcherSize")
    def dispatcher_size(self) -> Optional[int]:
        """
        The number of subtask distribution threads. The default value is 5.
        """
        return pulumi.get(self, "dispatcher_size")

    @property
    @pulumi.getter(name="pageSize")
    def page_size(self) -> Optional[int]:
        """
        The number of sub-tasks pulled by a parallel task at a time. The default value is 100.
        """
        return pulumi.get(self, "page_size")

    @property
    @pulumi.getter(name="queueSize")
    def queue_size(self) -> Optional[int]:
        """
        The upper limit of the sub-task queue cache. The default value is 10000.
        """
        return pulumi.get(self, "queue_size")

    @property
    @pulumi.getter(name="taskAttemptInterval")
    def task_attempt_interval(self) -> Optional[int]:
        """
        Subtask failure retry interval.
        """
        return pulumi.get(self, "task_attempt_interval")

    @property
    @pulumi.getter(name="taskMaxAttempt")
    def task_max_attempt(self) -> Optional[int]:
        """
        The number of failed sub-task retries.
        """
        return pulumi.get(self, "task_max_attempt")


@pulumi.output_type
class JobTimeConfig(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "timeType":
            suggest = "time_type"
        elif key == "dataOffset":
            suggest = "data_offset"
        elif key == "timeExpression":
            suggest = "time_expression"

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

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

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

    def __init__(__self__, *,
                 time_type: int,
                 calendar: Optional[str] = None,
                 data_offset: Optional[int] = None,
                 time_expression: Optional[str] = None):
        """
        :param int time_type: Time configuration type. Currently, the following time types are supported:
        :param str calendar: The cron type can optionally fill in a custom calendar.
        :param int data_offset: Cron type can choose time offset, unit s.
        :param str time_expression: Time expressions. Currently, the following types of time expressions are supported:
        """
        pulumi.set(__self__, "time_type", time_type)
        if calendar is not None:
            pulumi.set(__self__, "calendar", calendar)
        if data_offset is not None:
            pulumi.set(__self__, "data_offset", data_offset)
        if time_expression is not None:
            pulumi.set(__self__, "time_expression", time_expression)

    @property
    @pulumi.getter(name="timeType")
    def time_type(self) -> int:
        """
        Time configuration type. Currently, the following time types are supported:
        """
        return pulumi.get(self, "time_type")

    @property
    @pulumi.getter
    def calendar(self) -> Optional[str]:
        """
        The cron type can optionally fill in a custom calendar.
        """
        return pulumi.get(self, "calendar")

    @property
    @pulumi.getter(name="dataOffset")
    def data_offset(self) -> Optional[int]:
        """
        Cron type can choose time offset, unit s.
        """
        return pulumi.get(self, "data_offset")

    @property
    @pulumi.getter(name="timeExpression")
    def time_expression(self) -> Optional[str]:
        """
        Time expressions. Currently, the following types of time expressions are supported:
        """
        return pulumi.get(self, "time_expression")


@pulumi.output_type
class GetNamespacesNamespaceResult(dict):
    def __init__(__self__, *,
                 description: str,
                 id: str,
                 namespace_id: str,
                 namespace_name: str):
        """
        :param str description: The description of the resource.
        :param str id: The ID of the resource.
        :param str namespace_id: The ID of the Namespace.
        :param str namespace_name: The name of the resource.
        """
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "namespace_id", namespace_id)
        pulumi.set(__self__, "namespace_name", namespace_name)

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        The description of the resource.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The ID of the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="namespaceId")
    def namespace_id(self) -> str:
        """
        The ID of the Namespace.
        """
        return pulumi.get(self, "namespace_id")

    @property
    @pulumi.getter(name="namespaceName")
    def namespace_name(self) -> str:
        """
        The name of the resource.
        """
        return pulumi.get(self, "namespace_name")


