# 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__ = [
    'EndpointCertificate',
    'EndpointModelReference',
    'EndpointModelReferenceFoundationModel',
    'EndpointModeration',
    'EndpointRateLimit',
    'EndpointTag',
    'GetEndpointCertificateResult',
    'GetEndpointModelReferenceResult',
    'GetEndpointModelReferenceFoundationModelResult',
    'GetEndpointModerationResult',
    'GetEndpointRateLimitResult',
    'GetEndpointTagResult',
]

@pulumi.output_type
class EndpointCertificate(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "notAfter":
            suggest = "not_after"
        elif key == "notBefore":
            suggest = "not_before"
        elif key == "pcaHost":
            suggest = "pca_host"
        elif key == "pcaInstanceCertificate":
            suggest = "pca_instance_certificate"
        elif key == "pcaName":
            suggest = "pca_name"
        elif key == "pcaRootCaCertificate":
            suggest = "pca_root_ca_certificate"
        elif key == "pcaSubCaCertificate":
            suggest = "pca_sub_ca_certificate"

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

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

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

    def __init__(__self__, *,
                 not_after: Optional[builtins.int] = None,
                 not_before: Optional[builtins.int] = None,
                 pca_host: Optional[builtins.str] = None,
                 pca_instance_certificate: Optional[builtins.str] = None,
                 pca_name: Optional[builtins.str] = None,
                 pca_root_ca_certificate: Optional[builtins.str] = None,
                 pca_sub_ca_certificate: Optional[builtins.str] = None):
        """
        :param builtins.int not_after: X509私有证书过期的时间。使用秒级时间戳表示。
        :param builtins.int not_before: X509私有证书开始生效的时间。使用秒级时间戳表示。
        :param builtins.str pca_host: 证书方。
        :param builtins.str pca_instance_certificate: PEM 格式的叶子证书。
        :param builtins.str pca_name: 证书名称。
        :param builtins.str pca_root_ca_certificate: PEM 格式的根证书。
        :param builtins.str pca_sub_ca_certificate: PEM 格式的中间根证书和根证书。
        """
        if not_after is not None:
            pulumi.set(__self__, "not_after", not_after)
        if not_before is not None:
            pulumi.set(__self__, "not_before", not_before)
        if pca_host is not None:
            pulumi.set(__self__, "pca_host", pca_host)
        if pca_instance_certificate is not None:
            pulumi.set(__self__, "pca_instance_certificate", pca_instance_certificate)
        if pca_name is not None:
            pulumi.set(__self__, "pca_name", pca_name)
        if pca_root_ca_certificate is not None:
            pulumi.set(__self__, "pca_root_ca_certificate", pca_root_ca_certificate)
        if pca_sub_ca_certificate is not None:
            pulumi.set(__self__, "pca_sub_ca_certificate", pca_sub_ca_certificate)

    @property
    @pulumi.getter(name="notAfter")
    def not_after(self) -> Optional[builtins.int]:
        """
        X509私有证书过期的时间。使用秒级时间戳表示。
        """
        return pulumi.get(self, "not_after")

    @property
    @pulumi.getter(name="notBefore")
    def not_before(self) -> Optional[builtins.int]:
        """
        X509私有证书开始生效的时间。使用秒级时间戳表示。
        """
        return pulumi.get(self, "not_before")

    @property
    @pulumi.getter(name="pcaHost")
    def pca_host(self) -> Optional[builtins.str]:
        """
        证书方。
        """
        return pulumi.get(self, "pca_host")

    @property
    @pulumi.getter(name="pcaInstanceCertificate")
    def pca_instance_certificate(self) -> Optional[builtins.str]:
        """
        PEM 格式的叶子证书。
        """
        return pulumi.get(self, "pca_instance_certificate")

    @property
    @pulumi.getter(name="pcaName")
    def pca_name(self) -> Optional[builtins.str]:
        """
        证书名称。
        """
        return pulumi.get(self, "pca_name")

    @property
    @pulumi.getter(name="pcaRootCaCertificate")
    def pca_root_ca_certificate(self) -> Optional[builtins.str]:
        """
        PEM 格式的根证书。
        """
        return pulumi.get(self, "pca_root_ca_certificate")

    @property
    @pulumi.getter(name="pcaSubCaCertificate")
    def pca_sub_ca_certificate(self) -> Optional[builtins.str]:
        """
        PEM 格式的中间根证书和根证书。
        """
        return pulumi.get(self, "pca_sub_ca_certificate")


@pulumi.output_type
class EndpointModelReference(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "customModelId":
            suggest = "custom_model_id"
        elif key == "foundationModel":
            suggest = "foundation_model"

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

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

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

    def __init__(__self__, *,
                 custom_model_id: Optional[builtins.str] = None,
                 foundation_model: Optional['outputs.EndpointModelReferenceFoundationModel'] = None):
        """
        :param builtins.str custom_model_id: 定制模型的ID。
        :param 'EndpointModelReferenceFoundationModelArgs' foundation_model: 基础模型。
        """
        if custom_model_id is not None:
            pulumi.set(__self__, "custom_model_id", custom_model_id)
        if foundation_model is not None:
            pulumi.set(__self__, "foundation_model", foundation_model)

    @property
    @pulumi.getter(name="customModelId")
    def custom_model_id(self) -> Optional[builtins.str]:
        """
        定制模型的ID。
        """
        return pulumi.get(self, "custom_model_id")

    @property
    @pulumi.getter(name="foundationModel")
    def foundation_model(self) -> Optional['outputs.EndpointModelReferenceFoundationModel']:
        """
        基础模型。
        """
        return pulumi.get(self, "foundation_model")


@pulumi.output_type
class EndpointModelReferenceFoundationModel(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "modelVersion":
            suggest = "model_version"

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

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

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

    def __init__(__self__, *,
                 model_version: Optional[builtins.str] = None,
                 name: Optional[builtins.str] = None):
        """
        :param builtins.str model_version: 基础模型版本。
        :param builtins.str name: 基础模型名称。请注意模型名称为小写。doubao 1.5 代模型的模型名称格式为"doubao-1-5-**"。
        """
        if model_version is not None:
            pulumi.set(__self__, "model_version", model_version)
        if name is not None:
            pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter(name="modelVersion")
    def model_version(self) -> Optional[builtins.str]:
        """
        基础模型版本。
        """
        return pulumi.get(self, "model_version")

    @property
    @pulumi.getter
    def name(self) -> Optional[builtins.str]:
        """
        基础模型名称。请注意模型名称为小写。doubao 1.5 代模型的模型名称格式为"doubao-1-5-**"。
        """
        return pulumi.get(self, "name")


@pulumi.output_type
class EndpointModeration(dict):
    def __init__(__self__, *,
                 strategy: Optional[builtins.str] = None):
        """
        :param builtins.str strategy: 内容安全护栏方案。取值:Default: 默认方案。更低延迟，广泛覆盖内容安全通用需求;Basic：基本方案（公测中）。支持在接口响应中提供命中的风险分类，暂时只包含严重违规和激进行为两类风险。注意：如果是流式接口调用，不建议此方案，会导致吐出的每个分片的长度变长，延时变高。
        """
        if strategy is not None:
            pulumi.set(__self__, "strategy", strategy)

    @property
    @pulumi.getter
    def strategy(self) -> Optional[builtins.str]:
        """
        内容安全护栏方案。取值:Default: 默认方案。更低延迟，广泛覆盖内容安全通用需求;Basic：基本方案（公测中）。支持在接口响应中提供命中的风险分类，暂时只包含严重违规和激进行为两类风险。注意：如果是流式接口调用，不建议此方案，会导致吐出的每个分片的长度变长，延时变高。
        """
        return pulumi.get(self, "strategy")


@pulumi.output_type
class EndpointRateLimit(dict):
    def __init__(__self__, *,
                 rpm: Optional[builtins.int] = None,
                 tpm: Optional[builtins.int] = None):
        """
        :param builtins.int rpm: Requests Per Minute，每分钟请求数。
        :param builtins.int tpm: Tokens Per Minute，每分钟请求 token 数。
        """
        if rpm is not None:
            pulumi.set(__self__, "rpm", rpm)
        if tpm is not None:
            pulumi.set(__self__, "tpm", tpm)

    @property
    @pulumi.getter
    def rpm(self) -> Optional[builtins.int]:
        """
        Requests Per Minute，每分钟请求数。
        """
        return pulumi.get(self, "rpm")

    @property
    @pulumi.getter
    def tpm(self) -> Optional[builtins.int]:
        """
        Tokens Per Minute，每分钟请求 token 数。
        """
        return pulumi.get(self, "tpm")


@pulumi.output_type
class EndpointTag(dict):
    def __init__(__self__, *,
                 key: Optional[builtins.str] = None,
                 value: Optional[builtins.str] = None):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        if key is not None:
            pulumi.set(__self__, "key", key)
        if value is not None:
            pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> Optional[builtins.str]:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> Optional[builtins.str]:
        """
        标签值。
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class GetEndpointCertificateResult(dict):
    def __init__(__self__, *,
                 not_after: builtins.int,
                 not_before: builtins.int,
                 pca_host: builtins.str,
                 pca_instance_certificate: builtins.str,
                 pca_name: builtins.str,
                 pca_root_ca_certificate: builtins.str,
                 pca_sub_ca_certificate: builtins.str):
        """
        :param builtins.int not_after: X509私有证书过期的时间。使用秒级时间戳表示。
        :param builtins.int not_before: X509私有证书开始生效的时间。使用秒级时间戳表示。
        :param builtins.str pca_host: 证书方。
        :param builtins.str pca_instance_certificate: PEM 格式的叶子证书。
        :param builtins.str pca_name: 证书名称。
        :param builtins.str pca_root_ca_certificate: PEM 格式的根证书。
        :param builtins.str pca_sub_ca_certificate: PEM 格式的中间根证书和根证书。
        """
        pulumi.set(__self__, "not_after", not_after)
        pulumi.set(__self__, "not_before", not_before)
        pulumi.set(__self__, "pca_host", pca_host)
        pulumi.set(__self__, "pca_instance_certificate", pca_instance_certificate)
        pulumi.set(__self__, "pca_name", pca_name)
        pulumi.set(__self__, "pca_root_ca_certificate", pca_root_ca_certificate)
        pulumi.set(__self__, "pca_sub_ca_certificate", pca_sub_ca_certificate)

    @property
    @pulumi.getter(name="notAfter")
    def not_after(self) -> builtins.int:
        """
        X509私有证书过期的时间。使用秒级时间戳表示。
        """
        return pulumi.get(self, "not_after")

    @property
    @pulumi.getter(name="notBefore")
    def not_before(self) -> builtins.int:
        """
        X509私有证书开始生效的时间。使用秒级时间戳表示。
        """
        return pulumi.get(self, "not_before")

    @property
    @pulumi.getter(name="pcaHost")
    def pca_host(self) -> builtins.str:
        """
        证书方。
        """
        return pulumi.get(self, "pca_host")

    @property
    @pulumi.getter(name="pcaInstanceCertificate")
    def pca_instance_certificate(self) -> builtins.str:
        """
        PEM 格式的叶子证书。
        """
        return pulumi.get(self, "pca_instance_certificate")

    @property
    @pulumi.getter(name="pcaName")
    def pca_name(self) -> builtins.str:
        """
        证书名称。
        """
        return pulumi.get(self, "pca_name")

    @property
    @pulumi.getter(name="pcaRootCaCertificate")
    def pca_root_ca_certificate(self) -> builtins.str:
        """
        PEM 格式的根证书。
        """
        return pulumi.get(self, "pca_root_ca_certificate")

    @property
    @pulumi.getter(name="pcaSubCaCertificate")
    def pca_sub_ca_certificate(self) -> builtins.str:
        """
        PEM 格式的中间根证书和根证书。
        """
        return pulumi.get(self, "pca_sub_ca_certificate")


@pulumi.output_type
class GetEndpointModelReferenceResult(dict):
    def __init__(__self__, *,
                 custom_model_id: builtins.str,
                 foundation_model: 'outputs.GetEndpointModelReferenceFoundationModelResult'):
        """
        :param builtins.str custom_model_id: 定制模型的ID。
        :param 'GetEndpointModelReferenceFoundationModelArgs' foundation_model: 基础模型。
        """
        pulumi.set(__self__, "custom_model_id", custom_model_id)
        pulumi.set(__self__, "foundation_model", foundation_model)

    @property
    @pulumi.getter(name="customModelId")
    def custom_model_id(self) -> builtins.str:
        """
        定制模型的ID。
        """
        return pulumi.get(self, "custom_model_id")

    @property
    @pulumi.getter(name="foundationModel")
    def foundation_model(self) -> 'outputs.GetEndpointModelReferenceFoundationModelResult':
        """
        基础模型。
        """
        return pulumi.get(self, "foundation_model")


@pulumi.output_type
class GetEndpointModelReferenceFoundationModelResult(dict):
    def __init__(__self__, *,
                 model_version: builtins.str,
                 name: builtins.str):
        """
        :param builtins.str model_version: 基础模型版本。
        :param builtins.str name: 基础模型名称。请注意模型名称为小写。doubao 1.5 代模型的模型名称格式为"doubao-1-5-**"。
        """
        pulumi.set(__self__, "model_version", model_version)
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter(name="modelVersion")
    def model_version(self) -> builtins.str:
        """
        基础模型版本。
        """
        return pulumi.get(self, "model_version")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        基础模型名称。请注意模型名称为小写。doubao 1.5 代模型的模型名称格式为"doubao-1-5-**"。
        """
        return pulumi.get(self, "name")


@pulumi.output_type
class GetEndpointModerationResult(dict):
    def __init__(__self__, *,
                 strategy: builtins.str):
        """
        :param builtins.str strategy: 内容安全护栏方案。取值:Default: 默认方案。更低延迟，广泛覆盖内容安全通用需求;Basic：基本方案（公测中）。支持在接口响应中提供命中的风险分类，暂时只包含严重违规和激进行为两类风险。注意：如果是流式接口调用，不建议此方案，会导致吐出的每个分片的长度变长，延时变高。
        """
        pulumi.set(__self__, "strategy", strategy)

    @property
    @pulumi.getter
    def strategy(self) -> builtins.str:
        """
        内容安全护栏方案。取值:Default: 默认方案。更低延迟，广泛覆盖内容安全通用需求;Basic：基本方案（公测中）。支持在接口响应中提供命中的风险分类，暂时只包含严重违规和激进行为两类风险。注意：如果是流式接口调用，不建议此方案，会导致吐出的每个分片的长度变长，延时变高。
        """
        return pulumi.get(self, "strategy")


@pulumi.output_type
class GetEndpointRateLimitResult(dict):
    def __init__(__self__, *,
                 rpm: builtins.int,
                 tpm: builtins.int):
        """
        :param builtins.int rpm: Requests Per Minute，每分钟请求数。
        :param builtins.int tpm: Tokens Per Minute，每分钟请求 token 数。
        """
        pulumi.set(__self__, "rpm", rpm)
        pulumi.set(__self__, "tpm", tpm)

    @property
    @pulumi.getter
    def rpm(self) -> builtins.int:
        """
        Requests Per Minute，每分钟请求数。
        """
        return pulumi.get(self, "rpm")

    @property
    @pulumi.getter
    def tpm(self) -> builtins.int:
        """
        Tokens Per Minute，每分钟请求 token 数。
        """
        return pulumi.get(self, "tpm")


@pulumi.output_type
class GetEndpointTagResult(dict):
    def __init__(__self__, *,
                 key: builtins.str,
                 value: builtins.str):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> builtins.str:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> builtins.str:
        """
        标签值。
        """
        return pulumi.get(self, "value")


