# This file was auto-generated by Fern from our API Definition.

from ...core.unchecked_base_model import UncheckedBaseModel
import typing
from .mimecast_api_gateway import MimecastApiGateway
import pydantic
from .mimecast_cloud_gateway_credential import MimecastCloudGatewayCredential
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class EmailSecurityMimecastCloudGateway(UncheckedBaseModel):
    """
    Configuration for Mimecast Cloud Gateway as an email security provider.

    [Configuration guide](https://docs.synqly.com/guides/provider-configuration/mimecast-cloud-gateway-setup)
    """

    api_gateway: typing.Optional[MimecastApiGateway] = pydantic.Field(default=None)
    """
    Option to override the Mimecast Cloud Gateway API region. If not specified this defaults to the `global` region. For more information, see the [Mimecast API Gateway documentation](https://developer.services.mimecast.com/api-overview#api-gateway-options).
    """

    credential: MimecastCloudGatewayCredential = pydantic.Field()
    """
    Credentials for the Mimecast Cloud Gateway API.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
