# generated by datamodel-codegen:
#   filename:  hostname_multiple_types.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, Field, RootModel, constr


class HostnameMultiple1(BaseModel):
    name: str | None = None


class HostnameMultiple(
    RootModel[
        HostnameMultiple1
        | constr(
            pattern=r'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$'
        )
    ]
):
    root: HostnameMultiple1 | constr(
        pattern=r'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9])$'
    ) = Field(..., title='HostnameMultiple')
