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

__all__ = [
    'GetApplicationSegmentResult',
    'AwaitableGetApplicationSegmentResult',
    'get_application_segment',
    'get_application_segment_output',
]

@pulumi.output_type
class GetApplicationSegmentResult:
    """
    A collection of values returned by getApplicationSegment.
    """
    def __init__(__self__, bypass_type=None, config_space=None, creation_time=None, default_idle_timeout=None, default_max_age=None, description=None, domain_names=None, double_encrypt=None, enabled=None, health_check_type=None, health_reporting=None, id=None, ip_anchored=None, is_cname_enabled=None, is_incomplete_dr_config=None, microtenant_id=None, microtenant_name=None, modified_time=None, modifiedby=None, name=None, passive_health_enabled=None, segment_group_id=None, segment_group_name=None, select_connector_close_to_app=None, server_groups=None, tcp_port_range=None, tcp_port_ranges=None, udp_port_range=None, udp_port_ranges=None, use_in_dr_mode=None):
        if bypass_type and not isinstance(bypass_type, str):
            raise TypeError("Expected argument 'bypass_type' to be a str")
        pulumi.set(__self__, "bypass_type", bypass_type)
        if config_space and not isinstance(config_space, str):
            raise TypeError("Expected argument 'config_space' to be a str")
        pulumi.set(__self__, "config_space", config_space)
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if default_idle_timeout and not isinstance(default_idle_timeout, str):
            raise TypeError("Expected argument 'default_idle_timeout' to be a str")
        pulumi.set(__self__, "default_idle_timeout", default_idle_timeout)
        if default_max_age and not isinstance(default_max_age, str):
            raise TypeError("Expected argument 'default_max_age' to be a str")
        pulumi.set(__self__, "default_max_age", default_max_age)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if domain_names and not isinstance(domain_names, list):
            raise TypeError("Expected argument 'domain_names' to be a list")
        pulumi.set(__self__, "domain_names", domain_names)
        if double_encrypt and not isinstance(double_encrypt, bool):
            raise TypeError("Expected argument 'double_encrypt' to be a bool")
        pulumi.set(__self__, "double_encrypt", double_encrypt)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if health_check_type and not isinstance(health_check_type, str):
            raise TypeError("Expected argument 'health_check_type' to be a str")
        pulumi.set(__self__, "health_check_type", health_check_type)
        if health_reporting and not isinstance(health_reporting, str):
            raise TypeError("Expected argument 'health_reporting' to be a str")
        pulumi.set(__self__, "health_reporting", health_reporting)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ip_anchored and not isinstance(ip_anchored, bool):
            raise TypeError("Expected argument 'ip_anchored' to be a bool")
        pulumi.set(__self__, "ip_anchored", ip_anchored)
        if is_cname_enabled and not isinstance(is_cname_enabled, bool):
            raise TypeError("Expected argument 'is_cname_enabled' to be a bool")
        pulumi.set(__self__, "is_cname_enabled", is_cname_enabled)
        if is_incomplete_dr_config and not isinstance(is_incomplete_dr_config, bool):
            raise TypeError("Expected argument 'is_incomplete_dr_config' to be a bool")
        pulumi.set(__self__, "is_incomplete_dr_config", is_incomplete_dr_config)
        if microtenant_id and not isinstance(microtenant_id, str):
            raise TypeError("Expected argument 'microtenant_id' to be a str")
        pulumi.set(__self__, "microtenant_id", microtenant_id)
        if microtenant_name and not isinstance(microtenant_name, str):
            raise TypeError("Expected argument 'microtenant_name' to be a str")
        pulumi.set(__self__, "microtenant_name", microtenant_name)
        if modified_time and not isinstance(modified_time, str):
            raise TypeError("Expected argument 'modified_time' to be a str")
        pulumi.set(__self__, "modified_time", modified_time)
        if modifiedby and not isinstance(modifiedby, str):
            raise TypeError("Expected argument 'modifiedby' to be a str")
        pulumi.set(__self__, "modifiedby", modifiedby)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if passive_health_enabled and not isinstance(passive_health_enabled, bool):
            raise TypeError("Expected argument 'passive_health_enabled' to be a bool")
        pulumi.set(__self__, "passive_health_enabled", passive_health_enabled)
        if segment_group_id and not isinstance(segment_group_id, str):
            raise TypeError("Expected argument 'segment_group_id' to be a str")
        pulumi.set(__self__, "segment_group_id", segment_group_id)
        if segment_group_name and not isinstance(segment_group_name, str):
            raise TypeError("Expected argument 'segment_group_name' to be a str")
        pulumi.set(__self__, "segment_group_name", segment_group_name)
        if select_connector_close_to_app and not isinstance(select_connector_close_to_app, bool):
            raise TypeError("Expected argument 'select_connector_close_to_app' to be a bool")
        pulumi.set(__self__, "select_connector_close_to_app", select_connector_close_to_app)
        if server_groups and not isinstance(server_groups, list):
            raise TypeError("Expected argument 'server_groups' to be a list")
        pulumi.set(__self__, "server_groups", server_groups)
        if tcp_port_range and not isinstance(tcp_port_range, list):
            raise TypeError("Expected argument 'tcp_port_range' to be a list")
        pulumi.set(__self__, "tcp_port_range", tcp_port_range)
        if tcp_port_ranges and not isinstance(tcp_port_ranges, list):
            raise TypeError("Expected argument 'tcp_port_ranges' to be a list")
        pulumi.set(__self__, "tcp_port_ranges", tcp_port_ranges)
        if udp_port_range and not isinstance(udp_port_range, list):
            raise TypeError("Expected argument 'udp_port_range' to be a list")
        pulumi.set(__self__, "udp_port_range", udp_port_range)
        if udp_port_ranges and not isinstance(udp_port_ranges, list):
            raise TypeError("Expected argument 'udp_port_ranges' to be a list")
        pulumi.set(__self__, "udp_port_ranges", udp_port_ranges)
        if use_in_dr_mode and not isinstance(use_in_dr_mode, bool):
            raise TypeError("Expected argument 'use_in_dr_mode' to be a bool")
        pulumi.set(__self__, "use_in_dr_mode", use_in_dr_mode)

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

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

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

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

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

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

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

    @property
    @pulumi.getter(name="doubleEncrypt")
    def double_encrypt(self) -> bool:
        return pulumi.get(self, "double_encrypt")

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

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

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

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

    @property
    @pulumi.getter(name="ipAnchored")
    def ip_anchored(self) -> bool:
        return pulumi.get(self, "ip_anchored")

    @property
    @pulumi.getter(name="isCnameEnabled")
    def is_cname_enabled(self) -> bool:
        return pulumi.get(self, "is_cname_enabled")

    @property
    @pulumi.getter(name="isIncompleteDrConfig")
    def is_incomplete_dr_config(self) -> bool:
        return pulumi.get(self, "is_incomplete_dr_config")

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

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

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

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

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

    @property
    @pulumi.getter(name="passiveHealthEnabled")
    def passive_health_enabled(self) -> bool:
        return pulumi.get(self, "passive_health_enabled")

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

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

    @property
    @pulumi.getter(name="selectConnectorCloseToApp")
    def select_connector_close_to_app(self) -> bool:
        return pulumi.get(self, "select_connector_close_to_app")

    @property
    @pulumi.getter(name="serverGroups")
    def server_groups(self) -> Sequence['outputs.GetApplicationSegmentServerGroupResult']:
        return pulumi.get(self, "server_groups")

    @property
    @pulumi.getter(name="tcpPortRange")
    def tcp_port_range(self) -> Sequence['outputs.GetApplicationSegmentTcpPortRangeResult']:
        return pulumi.get(self, "tcp_port_range")

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

    @property
    @pulumi.getter(name="udpPortRange")
    def udp_port_range(self) -> Sequence['outputs.GetApplicationSegmentUdpPortRangeResult']:
        return pulumi.get(self, "udp_port_range")

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

    @property
    @pulumi.getter(name="useInDrMode")
    def use_in_dr_mode(self) -> bool:
        return pulumi.get(self, "use_in_dr_mode")


class AwaitableGetApplicationSegmentResult(GetApplicationSegmentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetApplicationSegmentResult(
            bypass_type=self.bypass_type,
            config_space=self.config_space,
            creation_time=self.creation_time,
            default_idle_timeout=self.default_idle_timeout,
            default_max_age=self.default_max_age,
            description=self.description,
            domain_names=self.domain_names,
            double_encrypt=self.double_encrypt,
            enabled=self.enabled,
            health_check_type=self.health_check_type,
            health_reporting=self.health_reporting,
            id=self.id,
            ip_anchored=self.ip_anchored,
            is_cname_enabled=self.is_cname_enabled,
            is_incomplete_dr_config=self.is_incomplete_dr_config,
            microtenant_id=self.microtenant_id,
            microtenant_name=self.microtenant_name,
            modified_time=self.modified_time,
            modifiedby=self.modifiedby,
            name=self.name,
            passive_health_enabled=self.passive_health_enabled,
            segment_group_id=self.segment_group_id,
            segment_group_name=self.segment_group_name,
            select_connector_close_to_app=self.select_connector_close_to_app,
            server_groups=self.server_groups,
            tcp_port_range=self.tcp_port_range,
            tcp_port_ranges=self.tcp_port_ranges,
            udp_port_range=self.udp_port_range,
            udp_port_ranges=self.udp_port_ranges,
            use_in_dr_mode=self.use_in_dr_mode)


def get_application_segment(id: Optional[str] = None,
                            is_incomplete_dr_config: Optional[bool] = None,
                            microtenant_id: Optional[str] = None,
                            microtenant_name: Optional[str] = None,
                            name: Optional[str] = None,
                            tcp_port_range: Optional[Sequence[pulumi.InputType['GetApplicationSegmentTcpPortRangeArgs']]] = None,
                            udp_port_range: Optional[Sequence[pulumi.InputType['GetApplicationSegmentUdpPortRangeArgs']]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApplicationSegmentResult:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_application_segment(name="example")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_application_segment(id="123456789")
    ```


    :param bool is_incomplete_dr_config: Default: false. Boolean: `true`, `false`.
    :param str microtenant_id: The ID of the microtenant the resource is to be associated with.
    :param str microtenant_name: The name of the microtenant the resource is to be associated with.
    :param str name: Name of the application.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['isIncompleteDrConfig'] = is_incomplete_dr_config
    __args__['microtenantId'] = microtenant_id
    __args__['microtenantName'] = microtenant_name
    __args__['name'] = name
    __args__['tcpPortRange'] = tcp_port_range
    __args__['udpPortRange'] = udp_port_range
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('zpa:index/getApplicationSegment:getApplicationSegment', __args__, opts=opts, typ=GetApplicationSegmentResult).value

    return AwaitableGetApplicationSegmentResult(
        bypass_type=pulumi.get(__ret__, 'bypass_type'),
        config_space=pulumi.get(__ret__, 'config_space'),
        creation_time=pulumi.get(__ret__, 'creation_time'),
        default_idle_timeout=pulumi.get(__ret__, 'default_idle_timeout'),
        default_max_age=pulumi.get(__ret__, 'default_max_age'),
        description=pulumi.get(__ret__, 'description'),
        domain_names=pulumi.get(__ret__, 'domain_names'),
        double_encrypt=pulumi.get(__ret__, 'double_encrypt'),
        enabled=pulumi.get(__ret__, 'enabled'),
        health_check_type=pulumi.get(__ret__, 'health_check_type'),
        health_reporting=pulumi.get(__ret__, 'health_reporting'),
        id=pulumi.get(__ret__, 'id'),
        ip_anchored=pulumi.get(__ret__, 'ip_anchored'),
        is_cname_enabled=pulumi.get(__ret__, 'is_cname_enabled'),
        is_incomplete_dr_config=pulumi.get(__ret__, 'is_incomplete_dr_config'),
        microtenant_id=pulumi.get(__ret__, 'microtenant_id'),
        microtenant_name=pulumi.get(__ret__, 'microtenant_name'),
        modified_time=pulumi.get(__ret__, 'modified_time'),
        modifiedby=pulumi.get(__ret__, 'modifiedby'),
        name=pulumi.get(__ret__, 'name'),
        passive_health_enabled=pulumi.get(__ret__, 'passive_health_enabled'),
        segment_group_id=pulumi.get(__ret__, 'segment_group_id'),
        segment_group_name=pulumi.get(__ret__, 'segment_group_name'),
        select_connector_close_to_app=pulumi.get(__ret__, 'select_connector_close_to_app'),
        server_groups=pulumi.get(__ret__, 'server_groups'),
        tcp_port_range=pulumi.get(__ret__, 'tcp_port_range'),
        tcp_port_ranges=pulumi.get(__ret__, 'tcp_port_ranges'),
        udp_port_range=pulumi.get(__ret__, 'udp_port_range'),
        udp_port_ranges=pulumi.get(__ret__, 'udp_port_ranges'),
        use_in_dr_mode=pulumi.get(__ret__, 'use_in_dr_mode'))


@_utilities.lift_output_func(get_application_segment)
def get_application_segment_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                                   is_incomplete_dr_config: Optional[pulumi.Input[Optional[bool]]] = None,
                                   microtenant_id: Optional[pulumi.Input[Optional[str]]] = None,
                                   microtenant_name: Optional[pulumi.Input[Optional[str]]] = None,
                                   name: Optional[pulumi.Input[Optional[str]]] = None,
                                   tcp_port_range: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationSegmentTcpPortRangeArgs']]]]] = None,
                                   udp_port_range: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetApplicationSegmentUdpPortRangeArgs']]]]] = None,
                                   opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetApplicationSegmentResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_application_segment(name="example")
    ```

    ```python
    import pulumi
    import pulumi_zpa as zpa

    this = zpa.get_application_segment(id="123456789")
    ```


    :param bool is_incomplete_dr_config: Default: false. Boolean: `true`, `false`.
    :param str microtenant_id: The ID of the microtenant the resource is to be associated with.
    :param str microtenant_name: The name of the microtenant the resource is to be associated with.
    :param str name: Name of the application.
    """
    ...
