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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .error import Error
from .register_domain_response_status import RegisterDomainResponseStatus


class RegisterDomainResponse(UncheckedBaseModel):
    """
    Defines the fields that are included in the response body of
    a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) endpoint.

    Either `errors` or `status` are present in a given response (never both).
    """

    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    Any errors that occurred during the request.
    """

    status: typing.Optional[RegisterDomainResponseStatus] = pydantic.Field(default=None)
    """
    The status of the domain registration.
    
    See [RegisterDomainResponseStatus](entity:RegisterDomainResponseStatus) for possible values.
    See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) for possible values
    """

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

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