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

from __future__ import annotations

from datetime import date as date_aliased
from enum import Enum
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


class EmploymentType(Enum):
    full_time = 'full_time'
    part_time = 'part_time'
    contract = 'contract'
    temporary = 'temporary'
    internship = 'internship'
    freelance = 'freelance'


class ExperienceLevel(Enum):
    entry_level = 'entry_level'
    mid_level = 'mid_level'
    senior = 'senior'
    director = 'director'
    executive = 'executive'


class Period(Enum):
    hour = 'hour'
    month = 'month'
    year = 'year'


class Salary(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    currency: Annotated[str, Field(description='ISO 4217 currency code.', pattern='^[A-Z]{3}$')]
    max: Annotated[float | None, Field(description='Maximum salary.', ge=0.0)] = None
    min: Annotated[float | None, Field(description='Minimum salary.', ge=0.0)] = None
    period: Annotated[Period, Field(description='Pay period.')]


class JobItem(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    apply_url: Annotated[AnyUrl | None, Field(description='Direct application URL.')] = None
    assets: Annotated[
        list[offering_asset_group.OfferingAssetGroup] | None,
        Field(
            description="Typed creative asset pools for this job. Uses the same OfferingAssetGroup structure as offering-type catalogs. Standard group IDs: 'images_landscape' (company/role hero), 'images_vertical' (9:16 for Stories), 'logo' (company logo). Enables formats to declare typed image requirements that map unambiguously to the right asset regardless of platform.",
            min_length=1,
        ),
    ] = None
    company_name: Annotated[str, Field(description='Hiring company or organization name.')]
    date_posted: Annotated[
        date_aliased | None, Field(description='Date the job was posted (ISO 8601 date).')
    ] = None
    description: Annotated[
        str,
        Field(description='Full job description including responsibilities and qualifications.'),
    ]
    employment_type: Annotated[EmploymentType | None, Field(description='Type of employment.')] = (
        None
    )
    experience_level: Annotated[
        ExperienceLevel | None, Field(description='Required experience level.')
    ] = None
    ext: ext_1.ExtensionObject | None = None
    industries: Annotated[
        list[str] | None,
        Field(
            description="Industry classifications (e.g., 'technology', 'healthcare', 'retail').",
            min_length=1,
        ),
    ] = None
    job_functions: Annotated[
        list[str] | None,
        Field(
            description="Job function categories (e.g., 'engineering', 'marketing', 'sales', 'finance').",
            min_length=1,
        ),
    ] = None
    job_id: Annotated[str, Field(description='Unique identifier for this job posting.')]
    location: Annotated[
        str | None,
        Field(
            description="Job location as a display string (e.g., 'Amsterdam, NL', 'Remote', 'New York, NY'). Use 'Remote' for fully remote positions."
        ),
    ] = None
    salary: Annotated[
        Salary | None,
        Field(description='Salary range. Specify min and/or max with currency and period.'),
    ] = None
    tags: Annotated[
        list[str] | None,
        Field(
            description="Tags for filtering (e.g., 'remote', 'visa-sponsorship', 'equity').",
            min_length=1,
        ),
    ] = None
    title: Annotated[
        str, Field(description="Job title (e.g., 'Senior Software Engineer', 'Marketing Manager').")
    ]
    valid_through: Annotated[
        date_aliased | None, Field(description='Application deadline (ISO 8601 date).')
    ] = None
