# 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 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__ = [
    'GetGatewayServiceResult',
    'AwaitableGetGatewayServiceResult',
    'get_gateway_service',
    'get_gateway_service_output',
]

@pulumi.output_type
class GetGatewayServiceResult:
    """
    A collection of values returned by getGatewayService.
    """
    def __init__(__self__, auth_spec=None, comments=None, created_time=None, custom_domains=None, domain_spec=None, domains=None, gateway_id=None, gateway_name=None, id=None, message=None, protocols=None, service_id=None, service_name=None, status=None):
        if auth_spec and not isinstance(auth_spec, dict):
            raise TypeError("Expected argument 'auth_spec' to be a dict")
        pulumi.set(__self__, "auth_spec", auth_spec)
        if comments and not isinstance(comments, str):
            raise TypeError("Expected argument 'comments' to be a str")
        pulumi.set(__self__, "comments", comments)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if custom_domains and not isinstance(custom_domains, list):
            raise TypeError("Expected argument 'custom_domains' to be a list")
        pulumi.set(__self__, "custom_domains", custom_domains)
        if domain_spec and not isinstance(domain_spec, dict):
            raise TypeError("Expected argument 'domain_spec' to be a dict")
        pulumi.set(__self__, "domain_spec", domain_spec)
        if domains and not isinstance(domains, list):
            raise TypeError("Expected argument 'domains' to be a list")
        pulumi.set(__self__, "domains", domains)
        if gateway_id and not isinstance(gateway_id, str):
            raise TypeError("Expected argument 'gateway_id' to be a str")
        pulumi.set(__self__, "gateway_id", gateway_id)
        if gateway_name and not isinstance(gateway_name, str):
            raise TypeError("Expected argument 'gateway_name' to be a str")
        pulumi.set(__self__, "gateway_name", gateway_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if message and not isinstance(message, str):
            raise TypeError("Expected argument 'message' to be a str")
        pulumi.set(__self__, "message", message)
        if protocols and not isinstance(protocols, list):
            raise TypeError("Expected argument 'protocols' to be a list")
        pulumi.set(__self__, "protocols", protocols)
        if service_id and not isinstance(service_id, str):
            raise TypeError("Expected argument 'service_id' to be a str")
        pulumi.set(__self__, "service_id", service_id)
        if service_name and not isinstance(service_name, str):
            raise TypeError("Expected argument 'service_name' to be a str")
        pulumi.set(__self__, "service_name", service_name)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter(name="authSpec")
    def auth_spec(self) -> 'outputs.GetGatewayServiceAuthSpecResult':
        """
        认证配置。
        """
        return pulumi.get(self, "auth_spec")

    @property
    @pulumi.getter
    def comments(self) -> builtins.str:
        """
        备注，长度限制为0~253个字符。
        """
        return pulumi.get(self, "comments")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="customDomains")
    def custom_domains(self) -> Sequence['outputs.GetGatewayServiceCustomDomainResult']:
        """
        自定义域名列表。
        """
        return pulumi.get(self, "custom_domains")

    @property
    @pulumi.getter(name="domainSpec")
    def domain_spec(self) -> 'outputs.GetGatewayServiceDomainSpecResult':
        """
        域名详情。
        """
        return pulumi.get(self, "domain_spec")

    @property
    @pulumi.getter
    def domains(self) -> Sequence['outputs.GetGatewayServiceDomainResult']:
        """
        默认域名。
        """
        return pulumi.get(self, "domains")

    @property
    @pulumi.getter(name="gatewayId")
    def gateway_id(self) -> builtins.str:
        """
        网关ID。
        """
        return pulumi.get(self, "gateway_id")

    @property
    @pulumi.getter(name="gatewayName")
    def gateway_name(self) -> builtins.str:
        """
        网关名称。
        """
        return pulumi.get(self, "gateway_name")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def message(self) -> builtins.str:
        """
        服务创建失败、删除失败或异常时的错误信息。
        """
        return pulumi.get(self, "message")

    @property
    @pulumi.getter
    def protocols(self) -> Sequence[builtins.str]:
        """
        服务支持的协议。取值：HTTP：HTTP。HTTPS：HTTPS。
        """
        return pulumi.get(self, "protocols")

    @property
    @pulumi.getter(name="serviceId")
    def service_id(self) -> builtins.str:
        """
        服务ID。
        """
        return pulumi.get(self, "service_id")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> builtins.str:
        """
        服务名称。支持大小写字母、数字和中划线（-），长度限制为2~128个字符。不能以中划线（-）开头。。
        """
        return pulumi.get(self, "service_name")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        Creating：创建中。CreatedFailed：创建失败。Running：运行中。Deleting：删除中。DeletedFailed：删除失败。Abnormal：异常。
        """
        return pulumi.get(self, "status")


class AwaitableGetGatewayServiceResult(GetGatewayServiceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGatewayServiceResult(
            auth_spec=self.auth_spec,
            comments=self.comments,
            created_time=self.created_time,
            custom_domains=self.custom_domains,
            domain_spec=self.domain_spec,
            domains=self.domains,
            gateway_id=self.gateway_id,
            gateway_name=self.gateway_name,
            id=self.id,
            message=self.message,
            protocols=self.protocols,
            service_id=self.service_id,
            service_name=self.service_name,
            status=self.status)


def get_gateway_service(id: Optional[builtins.str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGatewayServiceResult:
    """
    Data Source schema for Byteplus::APIG::GatewayService


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:apig/getGatewayService:getGatewayService', __args__, opts=opts, typ=GetGatewayServiceResult).value

    return AwaitableGetGatewayServiceResult(
        auth_spec=pulumi.get(__ret__, 'auth_spec'),
        comments=pulumi.get(__ret__, 'comments'),
        created_time=pulumi.get(__ret__, 'created_time'),
        custom_domains=pulumi.get(__ret__, 'custom_domains'),
        domain_spec=pulumi.get(__ret__, 'domain_spec'),
        domains=pulumi.get(__ret__, 'domains'),
        gateway_id=pulumi.get(__ret__, 'gateway_id'),
        gateway_name=pulumi.get(__ret__, 'gateway_name'),
        id=pulumi.get(__ret__, 'id'),
        message=pulumi.get(__ret__, 'message'),
        protocols=pulumi.get(__ret__, 'protocols'),
        service_id=pulumi.get(__ret__, 'service_id'),
        service_name=pulumi.get(__ret__, 'service_name'),
        status=pulumi.get(__ret__, 'status'))
def get_gateway_service_output(id: Optional[pulumi.Input[builtins.str]] = None,
                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGatewayServiceResult]:
    """
    Data Source schema for Byteplus::APIG::GatewayService


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:apig/getGatewayService:getGatewayService', __args__, opts=opts, typ=GetGatewayServiceResult)
    return __ret__.apply(lambda __response__: GetGatewayServiceResult(
        auth_spec=pulumi.get(__response__, 'auth_spec'),
        comments=pulumi.get(__response__, 'comments'),
        created_time=pulumi.get(__response__, 'created_time'),
        custom_domains=pulumi.get(__response__, 'custom_domains'),
        domain_spec=pulumi.get(__response__, 'domain_spec'),
        domains=pulumi.get(__response__, 'domains'),
        gateway_id=pulumi.get(__response__, 'gateway_id'),
        gateway_name=pulumi.get(__response__, 'gateway_name'),
        id=pulumi.get(__response__, 'id'),
        message=pulumi.get(__response__, 'message'),
        protocols=pulumi.get(__response__, 'protocols'),
        service_id=pulumi.get(__response__, 'service_id'),
        service_name=pulumi.get(__response__, 'service_name'),
        status=pulumi.get(__response__, 'status')))
