# 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
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__ = [
    'RouteDestination',
    'RouteHeader',
    'RouteSource',
    'UpstreamHealthchecks',
    'UpstreamHealthchecksActive',
    'UpstreamHealthchecksActiveHealthy',
    'UpstreamHealthchecksActiveUnhealthy',
    'UpstreamHealthchecksPassive',
    'UpstreamHealthchecksPassiveHealthy',
    'UpstreamHealthchecksPassiveUnhealthy',
]

@pulumi.output_type
class RouteDestination(dict):
    def __init__(__self__, *,
                 ip: Optional[builtins.str] = None,
                 port: Optional[builtins.int] = None):
        if ip is not None:
            pulumi.set(__self__, "ip", ip)
        if port is not None:
            pulumi.set(__self__, "port", port)

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

    @property
    @pulumi.getter
    def port(self) -> Optional[builtins.int]:
        return pulumi.get(self, "port")


@pulumi.output_type
class RouteHeader(dict):
    def __init__(__self__, *,
                 name: builtins.str,
                 values: Sequence[builtins.str]):
        """
        :param builtins.str name: The name of the route
        """
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "values", values)

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

    @property
    @pulumi.getter
    def values(self) -> Sequence[builtins.str]:
        return pulumi.get(self, "values")


@pulumi.output_type
class RouteSource(dict):
    def __init__(__self__, *,
                 ip: Optional[builtins.str] = None,
                 port: Optional[builtins.int] = None):
        if ip is not None:
            pulumi.set(__self__, "ip", ip)
        if port is not None:
            pulumi.set(__self__, "port", port)

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

    @property
    @pulumi.getter
    def port(self) -> Optional[builtins.int]:
        return pulumi.get(self, "port")


@pulumi.output_type
class UpstreamHealthchecks(dict):
    def __init__(__self__, *,
                 active: Optional['outputs.UpstreamHealthchecksActive'] = None,
                 passive: Optional['outputs.UpstreamHealthchecksPassive'] = None):
        if active is not None:
            pulumi.set(__self__, "active", active)
        if passive is not None:
            pulumi.set(__self__, "passive", passive)

    @property
    @pulumi.getter
    def active(self) -> Optional['outputs.UpstreamHealthchecksActive']:
        return pulumi.get(self, "active")

    @property
    @pulumi.getter
    def passive(self) -> Optional['outputs.UpstreamHealthchecksPassive']:
        return pulumi.get(self, "passive")


@pulumi.output_type
class UpstreamHealthchecksActive(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "httpPath":
            suggest = "http_path"
        elif key == "httpsSni":
            suggest = "https_sni"
        elif key == "httpsVerifyCertificate":
            suggest = "https_verify_certificate"

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

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

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

    def __init__(__self__, *,
                 concurrency: Optional[builtins.int] = None,
                 healthy: Optional['outputs.UpstreamHealthchecksActiveHealthy'] = None,
                 http_path: Optional[builtins.str] = None,
                 https_sni: Optional[builtins.str] = None,
                 https_verify_certificate: Optional[builtins.bool] = None,
                 timeout: Optional[builtins.int] = None,
                 type: Optional[builtins.str] = None,
                 unhealthy: Optional['outputs.UpstreamHealthchecksActiveUnhealthy'] = None):
        if concurrency is not None:
            pulumi.set(__self__, "concurrency", concurrency)
        if healthy is not None:
            pulumi.set(__self__, "healthy", healthy)
        if http_path is not None:
            pulumi.set(__self__, "http_path", http_path)
        if https_sni is not None:
            pulumi.set(__self__, "https_sni", https_sni)
        if https_verify_certificate is not None:
            pulumi.set(__self__, "https_verify_certificate", https_verify_certificate)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if unhealthy is not None:
            pulumi.set(__self__, "unhealthy", unhealthy)

    @property
    @pulumi.getter
    def concurrency(self) -> Optional[builtins.int]:
        return pulumi.get(self, "concurrency")

    @property
    @pulumi.getter
    def healthy(self) -> Optional['outputs.UpstreamHealthchecksActiveHealthy']:
        return pulumi.get(self, "healthy")

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

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

    @property
    @pulumi.getter(name="httpsVerifyCertificate")
    def https_verify_certificate(self) -> Optional[builtins.bool]:
        return pulumi.get(self, "https_verify_certificate")

    @property
    @pulumi.getter
    def timeout(self) -> Optional[builtins.int]:
        return pulumi.get(self, "timeout")

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

    @property
    @pulumi.getter
    def unhealthy(self) -> Optional['outputs.UpstreamHealthchecksActiveUnhealthy']:
        return pulumi.get(self, "unhealthy")


@pulumi.output_type
class UpstreamHealthchecksActiveHealthy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "httpStatuses":
            suggest = "http_statuses"

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

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

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

    def __init__(__self__, *,
                 http_statuses: Optional[Sequence[builtins.int]] = None,
                 interval: Optional[builtins.int] = None,
                 successes: Optional[builtins.int] = None):
        if http_statuses is not None:
            pulumi.set(__self__, "http_statuses", http_statuses)
        if interval is not None:
            pulumi.set(__self__, "interval", interval)
        if successes is not None:
            pulumi.set(__self__, "successes", successes)

    @property
    @pulumi.getter(name="httpStatuses")
    def http_statuses(self) -> Optional[Sequence[builtins.int]]:
        return pulumi.get(self, "http_statuses")

    @property
    @pulumi.getter
    def interval(self) -> Optional[builtins.int]:
        return pulumi.get(self, "interval")

    @property
    @pulumi.getter
    def successes(self) -> Optional[builtins.int]:
        return pulumi.get(self, "successes")


@pulumi.output_type
class UpstreamHealthchecksActiveUnhealthy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "httpFailures":
            suggest = "http_failures"
        elif key == "httpStatuses":
            suggest = "http_statuses"
        elif key == "tcpFailures":
            suggest = "tcp_failures"

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

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

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

    def __init__(__self__, *,
                 http_failures: Optional[builtins.int] = None,
                 http_statuses: Optional[Sequence[builtins.int]] = None,
                 interval: Optional[builtins.int] = None,
                 tcp_failures: Optional[builtins.int] = None,
                 timeouts: Optional[builtins.int] = None):
        if http_failures is not None:
            pulumi.set(__self__, "http_failures", http_failures)
        if http_statuses is not None:
            pulumi.set(__self__, "http_statuses", http_statuses)
        if interval is not None:
            pulumi.set(__self__, "interval", interval)
        if tcp_failures is not None:
            pulumi.set(__self__, "tcp_failures", tcp_failures)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter(name="httpFailures")
    def http_failures(self) -> Optional[builtins.int]:
        return pulumi.get(self, "http_failures")

    @property
    @pulumi.getter(name="httpStatuses")
    def http_statuses(self) -> Optional[Sequence[builtins.int]]:
        return pulumi.get(self, "http_statuses")

    @property
    @pulumi.getter
    def interval(self) -> Optional[builtins.int]:
        return pulumi.get(self, "interval")

    @property
    @pulumi.getter(name="tcpFailures")
    def tcp_failures(self) -> Optional[builtins.int]:
        return pulumi.get(self, "tcp_failures")

    @property
    @pulumi.getter
    def timeouts(self) -> Optional[builtins.int]:
        return pulumi.get(self, "timeouts")


@pulumi.output_type
class UpstreamHealthchecksPassive(dict):
    def __init__(__self__, *,
                 healthy: Optional['outputs.UpstreamHealthchecksPassiveHealthy'] = None,
                 type: Optional[builtins.str] = None,
                 unhealthy: Optional['outputs.UpstreamHealthchecksPassiveUnhealthy'] = None):
        if healthy is not None:
            pulumi.set(__self__, "healthy", healthy)
        if type is not None:
            pulumi.set(__self__, "type", type)
        if unhealthy is not None:
            pulumi.set(__self__, "unhealthy", unhealthy)

    @property
    @pulumi.getter
    def healthy(self) -> Optional['outputs.UpstreamHealthchecksPassiveHealthy']:
        return pulumi.get(self, "healthy")

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

    @property
    @pulumi.getter
    def unhealthy(self) -> Optional['outputs.UpstreamHealthchecksPassiveUnhealthy']:
        return pulumi.get(self, "unhealthy")


@pulumi.output_type
class UpstreamHealthchecksPassiveHealthy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "httpStatuses":
            suggest = "http_statuses"

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

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

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

    def __init__(__self__, *,
                 http_statuses: Optional[Sequence[builtins.int]] = None,
                 successes: Optional[builtins.int] = None):
        if http_statuses is not None:
            pulumi.set(__self__, "http_statuses", http_statuses)
        if successes is not None:
            pulumi.set(__self__, "successes", successes)

    @property
    @pulumi.getter(name="httpStatuses")
    def http_statuses(self) -> Optional[Sequence[builtins.int]]:
        return pulumi.get(self, "http_statuses")

    @property
    @pulumi.getter
    def successes(self) -> Optional[builtins.int]:
        return pulumi.get(self, "successes")


@pulumi.output_type
class UpstreamHealthchecksPassiveUnhealthy(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "httpFailures":
            suggest = "http_failures"
        elif key == "httpStatuses":
            suggest = "http_statuses"
        elif key == "tcpFailures":
            suggest = "tcp_failures"

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

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

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

    def __init__(__self__, *,
                 http_failures: Optional[builtins.int] = None,
                 http_statuses: Optional[Sequence[builtins.int]] = None,
                 tcp_failures: Optional[builtins.int] = None,
                 timeouts: Optional[builtins.int] = None):
        if http_failures is not None:
            pulumi.set(__self__, "http_failures", http_failures)
        if http_statuses is not None:
            pulumi.set(__self__, "http_statuses", http_statuses)
        if tcp_failures is not None:
            pulumi.set(__self__, "tcp_failures", tcp_failures)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter(name="httpFailures")
    def http_failures(self) -> Optional[builtins.int]:
        return pulumi.get(self, "http_failures")

    @property
    @pulumi.getter(name="httpStatuses")
    def http_statuses(self) -> Optional[Sequence[builtins.int]]:
        return pulumi.get(self, "http_statuses")

    @property
    @pulumi.getter(name="tcpFailures")
    def tcp_failures(self) -> Optional[builtins.int]:
        return pulumi.get(self, "tcp_failures")

    @property
    @pulumi.getter
    def timeouts(self) -> Optional[builtins.int]:
        return pulumi.get(self, "timeouts")


