# 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 pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'LoadBalancerLink',
    'LoadBalancerNic',
    'LoadBalancerRoute',
    'LoadBalancerRouteHealthCheckConfiguration',
    'LoadBalancerTag',
    'LoadBalancerTarget',
]

@pulumi.output_type
class LoadBalancerLink(dict):
    def __init__(__self__, *,
                 rel: str,
                 href: Optional[str] = None,
                 hrefs: Optional[Sequence[str]] = None):
        pulumi.set(__self__, "rel", rel)
        if href is not None:
            pulumi.set(__self__, "href", href)
        if hrefs is not None:
            pulumi.set(__self__, "hrefs", hrefs)

    @property
    @pulumi.getter
    def rel(self) -> str:
        return pulumi.get(self, "rel")

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

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


@pulumi.output_type
class LoadBalancerNic(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "networkId":
            suggest = "network_id"
        elif key == "customProperties":
            suggest = "custom_properties"
        elif key == "deviceIndex":
            suggest = "device_index"
        elif key == "securityGroupIds":
            suggest = "security_group_ids"

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

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

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

    def __init__(__self__, *,
                 network_id: str,
                 addresses: Optional[Sequence[str]] = None,
                 custom_properties: Optional[Mapping[str, Any]] = None,
                 description: Optional[str] = None,
                 device_index: Optional[int] = None,
                 name: Optional[str] = None,
                 security_group_ids: Optional[Sequence[str]] = None):
        """
        :param Mapping[str, Any] custom_properties: Additional custom properties that may be used to extend the machine.
        :param str description: Describes machine within the scope of your organization and is not propagated to the cloud.
        :param str name: A human-friendly name used as an identifier in APIs that support this option.
        """
        pulumi.set(__self__, "network_id", network_id)
        if addresses is not None:
            pulumi.set(__self__, "addresses", addresses)
        if custom_properties is not None:
            pulumi.set(__self__, "custom_properties", custom_properties)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if device_index is not None:
            pulumi.set(__self__, "device_index", device_index)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if security_group_ids is not None:
            pulumi.set(__self__, "security_group_ids", security_group_ids)

    @property
    @pulumi.getter(name="networkId")
    def network_id(self) -> str:
        return pulumi.get(self, "network_id")

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

    @property
    @pulumi.getter(name="customProperties")
    def custom_properties(self) -> Optional[Mapping[str, Any]]:
        """
        Additional custom properties that may be used to extend the machine.
        """
        return pulumi.get(self, "custom_properties")

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        """
        Describes machine within the scope of your organization and is not propagated to the cloud.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        A human-friendly name used as an identifier in APIs that support this option.
        """
        return pulumi.get(self, "name")

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


@pulumi.output_type
class LoadBalancerRoute(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "memberPort":
            suggest = "member_port"
        elif key == "memberProtocol":
            suggest = "member_protocol"
        elif key == "healthCheckConfigurations":
            suggest = "health_check_configurations"

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

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

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

    def __init__(__self__, *,
                 member_port: str,
                 member_protocol: str,
                 port: str,
                 protocol: str,
                 health_check_configurations: Optional[Sequence['outputs.LoadBalancerRouteHealthCheckConfiguration']] = None):
        """
        :param str member_port: Member port where the traffic is routed to.
        :param str member_protocol: The protocol of the member traffic.
        :param str port: Port which the load balancer is listening to.
        :param str protocol: The protocol of the incoming load balancer requests.
        :param Sequence['LoadBalancerRouteHealthCheckConfigurationArgs'] health_check_configurations: Load balancer health check configuration.
        """
        pulumi.set(__self__, "member_port", member_port)
        pulumi.set(__self__, "member_protocol", member_protocol)
        pulumi.set(__self__, "port", port)
        pulumi.set(__self__, "protocol", protocol)
        if health_check_configurations is not None:
            pulumi.set(__self__, "health_check_configurations", health_check_configurations)

    @property
    @pulumi.getter(name="memberPort")
    def member_port(self) -> str:
        """
        Member port where the traffic is routed to.
        """
        return pulumi.get(self, "member_port")

    @property
    @pulumi.getter(name="memberProtocol")
    def member_protocol(self) -> str:
        """
        The protocol of the member traffic.
        """
        return pulumi.get(self, "member_protocol")

    @property
    @pulumi.getter
    def port(self) -> str:
        """
        Port which the load balancer is listening to.
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter
    def protocol(self) -> str:
        """
        The protocol of the incoming load balancer requests.
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter(name="healthCheckConfigurations")
    def health_check_configurations(self) -> Optional[Sequence['outputs.LoadBalancerRouteHealthCheckConfiguration']]:
        """
        Load balancer health check configuration.
        """
        return pulumi.get(self, "health_check_configurations")


@pulumi.output_type
class LoadBalancerRouteHealthCheckConfiguration(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "healthyThreshold":
            suggest = "healthy_threshold"
        elif key == "intervalSeconds":
            suggest = "interval_seconds"
        elif key == "timeoutSeconds":
            suggest = "timeout_seconds"
        elif key == "unhealthyThreshold":
            suggest = "unhealthy_threshold"
        elif key == "urlPath":
            suggest = "url_path"

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

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

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

    def __init__(__self__, *,
                 port: str,
                 protocol: str,
                 healthy_threshold: Optional[int] = None,
                 interval_seconds: Optional[int] = None,
                 timeout_seconds: Optional[int] = None,
                 unhealthy_threshold: Optional[int] = None,
                 url_path: Optional[str] = None):
        """
        :param str port: Port which the load balancer is listening to.
        :param str protocol: The protocol of the incoming load balancer requests.
        :param int healthy_threshold: Number of consecutive successful checks before considering a particular back-end instance as healthy.
        :param int interval_seconds: Interval (in seconds) at which the health checks will be performed.
        :param int timeout_seconds: Timeout (in seconds) to wait for a response from the back-end instance.
        """
        pulumi.set(__self__, "port", port)
        pulumi.set(__self__, "protocol", protocol)
        if healthy_threshold is not None:
            pulumi.set(__self__, "healthy_threshold", healthy_threshold)
        if interval_seconds is not None:
            pulumi.set(__self__, "interval_seconds", interval_seconds)
        if timeout_seconds is not None:
            pulumi.set(__self__, "timeout_seconds", timeout_seconds)
        if unhealthy_threshold is not None:
            pulumi.set(__self__, "unhealthy_threshold", unhealthy_threshold)
        if url_path is not None:
            pulumi.set(__self__, "url_path", url_path)

    @property
    @pulumi.getter
    def port(self) -> str:
        """
        Port which the load balancer is listening to.
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter
    def protocol(self) -> str:
        """
        The protocol of the incoming load balancer requests.
        """
        return pulumi.get(self, "protocol")

    @property
    @pulumi.getter(name="healthyThreshold")
    def healthy_threshold(self) -> Optional[int]:
        """
        Number of consecutive successful checks before considering a particular back-end instance as healthy.
        """
        return pulumi.get(self, "healthy_threshold")

    @property
    @pulumi.getter(name="intervalSeconds")
    def interval_seconds(self) -> Optional[int]:
        """
        Interval (in seconds) at which the health checks will be performed.
        """
        return pulumi.get(self, "interval_seconds")

    @property
    @pulumi.getter(name="timeoutSeconds")
    def timeout_seconds(self) -> Optional[int]:
        """
        Timeout (in seconds) to wait for a response from the back-end instance.
        """
        return pulumi.get(self, "timeout_seconds")

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

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


@pulumi.output_type
class LoadBalancerTag(dict):
    def __init__(__self__, *,
                 key: str,
                 value: str):
        """
        :param str key: Tag’s key.
        :param str value: Tag’s value.
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> str:
        """
        Tag’s key.
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> str:
        """
        Tag’s value.
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class LoadBalancerTarget(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "machineId":
            suggest = "machine_id"
        elif key == "networkInterfaceId":
            suggest = "network_interface_id"

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

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

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

    def __init__(__self__, *,
                 machine_id: str,
                 network_interface_id: Optional[str] = None):
        pulumi.set(__self__, "machine_id", machine_id)
        if network_interface_id is not None:
            pulumi.set(__self__, "network_interface_id", network_interface_id)

    @property
    @pulumi.getter(name="machineId")
    def machine_id(self) -> str:
        return pulumi.get(self, "machine_id")

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


