# Generated by ariadne-codegen
# Source: operations/

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import DomainStatus


class AddDomain(BaseModel):
    add_domain: "AddDomainAddDomain" = Field(alias="addDomain")


class AddDomainAddDomain(BaseModel):
    id: Any = Field(alias="_id")
    domain: str
    redirect_to: Optional[str] = Field(alias="redirectTo")
    service_id: Any = Field(alias="serviceID")
    project_id: Any = Field(alias="projectID")
    environment_id: Any = Field(alias="environmentID")
    status: DomainStatus
    status_reason: Optional[str] = Field(alias="statusReason")
    created_at: Any = Field(alias="createdAt")
    port_name: Optional[str] = Field(alias="portName")
    is_generated: bool = Field(alias="isGenerated")
    dns_records: Optional[list["AddDomainAddDomainDnsRecords"]] = Field(
        alias="dnsRecords"
    )


class AddDomainAddDomainDnsRecords(BaseModel):
    record_type: str = Field(alias="recordType")
    record_name: str = Field(alias="recordName")
    record_value: str = Field(alias="recordValue")


AddDomain.model_rebuild()
AddDomainAddDomain.model_rebuild()
