# generated by datamodel-codegen:
#   filename:  core/hotel_item.json
#   timestamp: 2026-02-27T02:10:10+00:00

from __future__ import annotations

from datetime import date as date_aliased
from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import AnyUrl, ConfigDict, Field

from . import ext as ext_1
from . import offering_asset_group
from . import price as price_1


class Address(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    city: Annotated[str | None, Field(description='City name.')] = None
    country: Annotated[
        str | None, Field(description='ISO 3166-1 alpha-2 country code.', pattern='^[A-Z]{2}$')
    ] = None
    postal_code: Annotated[str | None, Field(description='Postal or ZIP code.')] = None
    region: Annotated[str | None, Field(description='State, province, or region.')] = None
    street: Annotated[str | None, Field(description='Street address.')] = None


class Location(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    lat: Annotated[
        float, Field(description='Latitude in decimal degrees (WGS 84).', ge=-90.0, le=90.0)
    ]
    lng: Annotated[
        float, Field(description='Longitude in decimal degrees (WGS 84).', ge=-180.0, le=180.0)
    ]


class HotelItem(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    address: Annotated[
        Address | None, Field(description='Structured address for display and geocoding.')
    ] = None
    amenities: Annotated[
        list[str] | None,
        Field(
            description="Property amenities (e.g., 'pool', 'wifi', 'spa', 'parking', 'restaurant').",
            min_length=1,
        ),
    ] = None
    assets: Annotated[
        list[offering_asset_group.OfferingAssetGroup] | None,
        Field(
            description="Typed creative asset pools for this hotel. Uses the same OfferingAssetGroup structure as offering-type catalogs. Standard group IDs: 'images_landscape' (16:9 hero images), 'images_vertical' (9:16 for Snap, Stories), 'images_square' (1:1), 'logo'. Enables formats to declare typed image requirements that map unambiguously to the right asset regardless of platform.",
            min_length=1,
        ),
    ] = None
    check_in_time: Annotated[
        str | None,
        Field(
            description="Standard check-in time in HH:MM format (e.g., '15:00').",
            pattern='^[0-2][0-9]:[0-5][0-9]$',
        ),
    ] = None
    check_out_time: Annotated[
        str | None,
        Field(
            description="Standard check-out time in HH:MM format (e.g., '11:00').",
            pattern='^[0-2][0-9]:[0-5][0-9]$',
        ),
    ] = None
    description: Annotated[
        str | None, Field(description='Property description highlighting features and location.')
    ] = None
    ext: ext_1.ExtensionObject | None = None
    hotel_id: Annotated[
        str,
        Field(
            description='Unique identifier for this property. Used to match remarketing events and inventory feeds to the correct hotel.'
        ),
    ]
    image_url: Annotated[AnyUrl | None, Field(description='Primary property image URL.')] = None
    location: Annotated[Location, Field(description='Geographic coordinates of the property.')]
    name: Annotated[
        str,
        Field(description="Property name (e.g., 'Grand Hotel Amsterdam', 'Seaside Resort & Spa')."),
    ]
    phone: Annotated[str | None, Field(description='Property phone number in E.164 format.')] = None
    price: Annotated[
        price_1.Price | None,
        Field(description="Nightly rate or starting price. Use period 'night' for nightly rates."),
    ] = None
    star_rating: Annotated[
        int | None, Field(description='Official star rating (1–5).', ge=1, le=5)
    ] = None
    tags: Annotated[
        list[str] | None,
        Field(
            description="Tags for filtering and targeting (e.g., 'boutique', 'family', 'business', 'luxury').",
            min_length=1,
        ),
    ] = None
    url: Annotated[AnyUrl | None, Field(description='Property landing page or booking URL.')] = None
    valid_from: Annotated[
        date_aliased | None,
        Field(
            description="Date from which this item is available or this rate applies (ISO 8601, e.g., '2025-03-01'). Used for seasonal availability windows in feed imports."
        ),
    ] = None
    valid_to: Annotated[
        date_aliased | None,
        Field(
            description="Date until which this item is available or this rate applies (ISO 8601, e.g., '2025-09-30'). Used for seasonal availability windows in feed imports."
        ),
    ] = None
