# 停車 (https://nolantw.github.io/tdx/reference/parking/)

## `Parking`

### `car_parks`

```python
def car_parks(
    area: City | str | ParkingArea,
    *,
    query: Query[CarPark] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarPark]
```

取得路外停車場。

### `car_park_availability`

```python
def car_park_availability(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkAvailability] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkAvailability]
```

取得路外停車場的即時空位。

### `street_segments`

```python
def street_segments(
    city: City | str,
    *,
    query: Query[ParkingSegment] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingSegment]
```

取得路邊停車路段。

### `street_segment_availability`

```python
def street_segment_availability(
    city: City | str,
    *,
    query: Query[ParkingSegmentAvailability] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingSegmentAvailability]
```

取得路邊停車路段的即時空位。

### `street_spots`

```python
def street_spots(
    city: City | str,
    *,
    query: Query[StreetParkingSpot] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[StreetParkingSpot]
```

取得路邊停車格。

### `street_spot_availability`

```python
def street_spot_availability(
    city: City | str,
    *,
    query: Query[StreetSpotAvailability] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[StreetSpotAvailability]
```

取得路邊停車格的即時占用狀態。

### `car_park_spots`

```python
def car_park_spots(
    city: City | str,
    *,
    query: Query[CarParkSpots] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkSpots]
```

取得路外停車場的個別車格。

### `car_park_spot_availability`

```python
def car_park_spot_availability(
    city: City | str,
    *,
    query: Query[CarParkSpotAvailability] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkSpotAvailability]
```

取得路外停車場個別車格的即時占用狀態。

### `facilities`

```python
def facilities(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkFacilities] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkFacilities]
```

取得路外停車場的設施。

### `car_park_rates`

```python
def car_park_rates(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkRates] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkRates]
```

取得路外停車場的費率。

### `street_rates`

```python
def street_rates(
    city: City | str,
    *,
    query: Query[StreetParkingRates] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[StreetParkingRates]
```

取得路邊停車的費率。

### `entrances_and_exits`

```python
def entrances_and_exits(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkAccess] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkAccess]
```

取得停車場出入口。

### `opening_hours`

```python
def opening_hours(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkHours] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkHours]
```

取得停車場營業時間。

### `segment_charge_times`

```python
def segment_charge_times(
    city: City | str,
    *,
    query: Query[SegmentChargeTimes] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[SegmentChargeTimes]
```

依路邊停車路段取得收費時間。

### `spot_charge_times`

```python
def spot_charge_times(
    city: City | str,
    *,
    query: Query[SpotChargeTimes] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[SpotChargeTimes]
```

依路邊停車格取得收費時間。

### `car_park_spaces`

```python
def car_park_spaces(
    area: City | str | ParkingArea,
    *,
    query: Query[CarParkSpaces] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[CarParkSpaces]
```

取得路外停車場的車位數。

### `street_segment_spaces`

```python
def street_segment_spaces(
    city: City | str,
    *,
    query: Query[SegmentSpaces] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[SegmentSpaces]
```

取得路邊停車路段的車位數。

### `authorities`

```python
def authorities(
    *,
    query: Query[ParkingAuthority] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingAuthority]
```

取得停車主管機關。

### `operators`

```python
def operators(
    area: City | str | ParkingArea,
    *,
    query: Query[ParkingOperator] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingOperator]
```

取得停車營運業者。

### `alerts`

```python
def alerts(
    area: City | str | ParkingArea,
    *,
    query: Query[ParkingAlert] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingAlert]
```

取得停車服務通阻。

### `news`

```python
def news(
    area: City | str | ParkingArea,
    *,
    query: Query[ParkingNews] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingNews]
```

取得停車最新消息。

### `ticketing`

```python
def ticketing(
    area: City | str | ParkingArea,
    *,
    query: Query[ParkingTicketing] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[ParkingTicketing]
```

取得停車場的付款與票證方式。

### `railway_station_car_parks`

```python
def railway_station_car_parks(
    area: ParkingArea,
    *,
    query: Query[StationCarPark] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[StationCarPark]
```

取得軌道車站周邊的停車場。

### `airport_car_parks`

```python
def airport_car_parks(
    *,
    query: Query[AirportCarPark] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[AirportCarPark]
```

取得桃園機場各航廈的停車場。

### `freeway_service_area_car_parks`

```python
def freeway_service_area_car_parks(
    *,
    query: Query[FreewayCarPark] | QueryParams | None = None,
    limit: int | None = None,
    offset: int = 0,
    cache_ttl: float | None = None,
) -> Records[FreewayCarPark]
```

取得國道服務區的停車場。

## `ParkingArea`

```python
class ParkingArea(Enum):
    TOURISM = 'Tourism'
    PORT = 'Ship/Port/TIPC'
    FREEWAY = 'Road/Freeway/ServiceArea'
    TRA = 'Rail/Station/TRA'
    THSR = 'Rail/Station/THSR'
    TRTC = 'Rail/Station/TRTC'
    KRTC = 'Rail/Station/KRTC'
    TYMC = 'Rail/Station/TYMC'
    TMRT = 'Rail/Station/TMRT'
    TAOYUAN_AIRPORT = 'Air/Airport/TAC'
    CIVIL_AIRPORTS = 'Air/Airport/CAA'
```

## `CarParkArea`

```python
class CarParkArea(BaseModel):
    area_id: str | None
    parking_area_name: Name | None
    parking_types: tuple[int, ...] | None
    geometry: str | None
```

## `CarPark`

```python
class CarPark(BaseModel):
    id: str
    name: Name
    position: MaybePosition
    address: str | None
    operator_id: str | None
    fare_description: str | None
    geometry: str | None
    car_park_short_name: Name | None
    car_park_reg_no: str | None
    description: str | None
    car_park_type: int | None
    parking_guide_type: int | None
    parking_areas: tuple[CarParkArea, ...] | None
    parking_types: tuple[int, ...] | None
    parking_site_types: tuple[int, ...] | None
    charge_types: tuple[int, ...] | None
    telephone: str | None
    emergency_phone: str | None
    email: str | None
    image_urls: tuple[str, ...] | None
    website: str | None
    fare_url: str | None
    special_offer_description: str | None
    is_free_parking_out_of_hours: int | None
    vehicle_restriction: str | None
    is_public: int | None
    is_motorcycle: int | None
    operation_type: int | None
    live_occupancy_available: int | None
    ev_recharging_available: int | None
    monthly_ticket_available: int | None
    season_ticket_available: int | None
    reservation_available: int | None
    reservation_url: str | None
    reservation_description: str | None
    wheelchair_accessible: int | None
    overnight_permitted: int | None
    ticket_machine: int | None
    toilet: int | None
    restaurant: int | None
    gas_station: int | None
    shop: int | None
    gated: int | None
    lighting: int | None
    secure_parking: int | None
    ticket_office: int | None
    prohibited_for_any_hazardous_material_loads: int | None
    security_guard: int | None
    supervision: int | None
    supervision_type: int | None
    land_mark: str | None
    building_name: str | None
    location_map_url: str | None
    city: str | None
    city_code: str | None
    town_name: str | None
    town_id: str | None
```

## `ParkingRoadSection`

```python
class ParkingRoadSection(BaseModel):
    start: str | None
    end: str | None
```

## `ParkingSegmentRoad`

```python
class ParkingSegmentRoad(BaseModel):
    road_id: str | None
```

## `ParkingSegmentLink`

```python
class ParkingSegmentLink(BaseModel):
    link_id: str | None
```

## `ParkingSegment`

```python
class ParkingSegment(BaseModel):
    id: str
    name: Name
    position: MaybePosition
    road_section: ParkingRoadSection | None
    fare_description: str | None
    geometry: str | None
    description: str | None
    charging: int | None
    image_urls: tuple[str, ...] | None
    city: str | None
    city_code: str | None
    town_name: str | None
    town_id: str | None
    land_mark: str | None
    roads: tuple[ParkingSegmentRoad, ...] | None
    links: tuple[ParkingSegmentLink, ...] | None
```

## `ParkingSpaceCount`

```python
class ParkingSpaceCount(BaseModel):
    space_type: int
    capacity: int | None
    available_spaces: int | None
    is_mechanical: int | None
    charging: int | None
    max_allowed_length: float | None
    max_allowed_width: float | None
    max_height: float | None
    max_allowed_weight: float | None
    stay_type: int | None
    occupancy: str | None
```

## `ParkingAvailability`

```python
class ParkingAvailability(BaseModel):
    total_spaces: int | None
    available_spaces: int | None
    by_space_type: tuple[ParkingSpaceCount, ...] | None
    service_status: int | None
    full_status: int | None
    collected_at: MaybeTimestamp
```

## `CarParkAreaAvailability`

```python
class CarParkAreaAvailability(BaseModel):
    area_id: str | None
    space_type: int | None
    capacity: int | None
    available_spaces: int | None
```

## `CarParkAvailability`

```python
class CarParkAvailability(ParkingAvailability):
    id: str
    name: Name | None
    area_availabilities: tuple[CarParkAreaAvailability, ...] | None
    service_available_level: str | None
    almost_full_level: str | None
    full_level: str | None
    over_crowding_level: str | None
    charge_status: int | None
    remark: str | None
```

## `ParkingSegmentAvailability`

```python
class ParkingSegmentAvailability(ParkingAvailability):
    id: str
    name: Name | None
    service_available_level: str | None
    almost_full_level: str | None
    full_level: str | None
    over_crowding_level: str | None
    charge_status: int | None
    remark: str | None
```

## `ParkingSpot`

```python
class ParkingSpot(BaseModel):
    id: str
    space_type: int | None
    length: float | None
    width: float | None
    floor: str | None
    charging: int | None
```

## `StreetParkingSpot`

```python
class StreetParkingSpot(ParkingSpot):
    segment_id: str
    position: MaybePosition
    geometry: str | None
    link_id: str | None
```

## `CarParkSpots`

```python
class CarParkSpots(BaseModel):
    id: str
    name: Name | None
    spots: tuple[ParkingSpot, ...] | None
```

## `SpotAvailability`

```python
class SpotAvailability(BaseModel):
    id: str
    service_status: int | None
    spot_status: int | None
    device_status: int | None
    charge_status: int | None
    collected_at: MaybeTimestamp
    space_type: int | None
    floor: str | None
    remark: str | None
```

## `StreetSpotAvailability`

```python
class StreetSpotAvailability(SpotAvailability):
    segment_id: str | None
    remark: str | None
```

## `CarParkSpotAvailability`

```python
class CarParkSpotAvailability(BaseModel):
    id: str
    name: Name | None
    area_id: str | None
    spots: tuple[SpotAvailability, ...] | None
```

## `ParkingFacility`

```python
class ParkingFacility(BaseModel):
    name: str | None
    type: int | None
    location: str | None
```

## `ParkingFacilityMap`

```python
class ParkingFacilityMap(BaseModel):
    name: Name | None
    url: str | None
    floor: str | None
```

## `CarParkFacilities`

```python
class CarParkFacilities(BaseModel):
    id: str
    name: Name | None
    facilities: tuple[ParkingFacility, ...] | None
    maps: tuple[ParkingFacilityMap, ...] | None
```

## `ParkingRateBand`

```python
class ParkingRateBand(BaseModel):
    sequence: int | None
    note: str | None
    stay_start: int | None
    stay_end: int | None
    qualifier: int | None
    price: int | None
```

## `ParkingTimeRange`

```python
class ParkingTimeRange(BaseModel):
    service_days: ServiceDays | None
    starts_at: MaybeTimestamp
    ends_at: MaybeTimestamp
```

## `ParkingRate`

```python
class ParkingRate(BaseModel):
    service_day: ServiceDays | None
    name: str | None
    description: str | None
    space_type: int | None
    price: int | None
    maximum_price: int | None
    bands: tuple[ParkingRateBand, ...] | None
    qualifier: int | None
    free_maximum_stay: int | None
    start: str | None
    end: str | None
    restriction_user_type: int | None
    max_stay: int | None
    reset_interval: int | None
    reset_time: str | None
    rent_type: int | None
    rent_days: int | None
    restriction: str | None
    parking_times: tuple[ParkingTimeRange, ...] | None
    min_half_hour_charge: int | None
    rate_id: str | None
```

## `StreetParkingRates`

```python
class StreetParkingRates(BaseModel):
    description: str | None
    free: tuple[ParkingRate, ...] | None
    flat: tuple[ParkingRate, ...] | None
    hourly: tuple[ParkingRate, ...] | None
    progressive: tuple[ParkingRate, ...] | None
```

## `CarParkRates`

```python
class CarParkRates(StreetParkingRates):
    id: str
    name: Name | None
    rent: tuple[ParkingRate, ...] | None
    band: tuple[ParkingRate, ...] | None
```

## `ParkingEntry`

```python
class ParkingEntry(BaseModel):
    name: Name | None
    position: MaybePosition
    type: int | None
    road_name: str | None
    max_height: float | None
    max_allowed_width: float | None
    max_allowed_weight: float | None
    road_id: str | None
    cross_road_name: str | None
    link_id: str | None
    bearing: str | None
```

## `CarParkAccess`

```python
class CarParkAccess(BaseModel):
    id: str
    name: Name | None
    entrances: tuple[ParkingEntry, ...] | None
    exits: tuple[ParkingEntry, ...] | None
    combined: tuple[ParkingEntry, ...] | None
    entrance_exit_type: int | None
```

## `ParkingHours`

```python
class ParkingHours(BaseModel):
    service_day: ServiceDays | None
    description: str | None
    start: str | None
    end: str | None
    last_entrance: str | None
    free_of_charge: int | None
```

## `CarParkHours`

```python
class CarParkHours(BaseModel):
    id: str
    name: Name | None
    opening_hours: tuple[ParkingHours, ...] | None
```

## `ParkingChargeSpot`

```python
class ParkingChargeSpot(BaseModel):
    parking_spot_id: str | None
```

## `ParkingChargeRate`

```python
class ParkingChargeRate(BaseModel):
    rate_type: int | None
    rate_id: str | None
    parking_spots: tuple[ParkingChargeSpot, ...] | None
```

## `ParkingChargeTime`

```python
class ParkingChargeTime(BaseModel):
    service_day: ServiceDays | None
    start: str | None
    end: str | None
    description: str | None
    rates: tuple[ParkingChargeRate, ...] | None
    space_type: int | None
```

## `StreetChargeTimes`

```python
class StreetChargeTimes(BaseModel):
    charge_times: tuple[ParkingChargeTime, ...] | None
    no_parking_times: tuple[ParkingChargeTime, ...] | None
```

## `SegmentChargeTimes`

```python
class SegmentChargeTimes(StreetChargeTimes):
    id: str
    name: Name | None
    has_no_parking_time: int | None
```

## `SpotChargeTimes`

```python
class SpotChargeTimes(StreetChargeTimes):
    id: str
    has_no_parking_time: int | None
```

## `CarParkAreaSpaces`

```python
class CarParkAreaSpaces(BaseModel):
    space_type: int | None
    is_mechanical: int | None
    charging: int | None
    capacity: int | None
    max_allowed_length: float | None
    max_allowed_width: float | None
    max_height: float | None
    max_allowed_weight: float | None
    stay_type: int | None
    area_id: str | None
```

## `CarParkSpaces`

```python
class CarParkSpaces(BaseModel):
    id: str
    name: Name | None
    total_spaces: int | None
    spaces: tuple[ParkingSpaceCount, ...] | None
    area_spaces: tuple[CarParkAreaSpaces, ...] | None
```

## `SegmentSpaces`

```python
class SegmentSpaces(BaseModel):
    id: str
    name: Name | None
    total_spaces: int | None
    spaces: tuple[ParkingSpaceCount, ...] | None
```

## `ParkingAuthority`

```python
class ParkingAuthority(BaseModel):
    code: str
    name: Name | None
    telephone: str | None
    email: str | None
    website: str | None
    oid: str | None
    address: str | None
    logo_url: str | None
    updated_at: MaybeTimestamp
```

## `ParkingOperator`

```python
class ParkingOperator(BaseModel):
    id: str
    name: Name | None
    telephone: str | None
    email: str | None
    website: str | None
    address: str | None
    logo_url: str | None
    terms_url: str | None
    business_number: str | None
```

## `ParkingNotice`

```python
class ParkingNotice(BaseModel):
    title: str | None
    description: str | None
    published_at: MaybeTimestamp
    start: MaybeTimestamp
    end: MaybeTimestamp
```

## `ParkingAlertCarPark`

```python
class ParkingAlertCarPark(BaseModel):
    car_park_id: str | None
```

## `ParkingAlertParkingSegment`

```python
class ParkingAlertParkingSegment(BaseModel):
    parking_segment_id: str | None
    parking_segment_name: str | None
```

## `ParkingAlertParkingSpot`

```python
class ParkingAlertParkingSpot(BaseModel):
    parking_spot_id: str | None
```

## `ParkingAlert`

```python
class ParkingAlert(ParkingNotice):
    id: str
    status: int | None
    url: str | None
    operator_id: str | None
    operator_name: Name | None
    car_parks: tuple[ParkingAlertCarPark, ...] | None
    parking_segments: tuple[ParkingAlertParkingSegment, ...] | None
    parking_spots: tuple[ParkingAlertParkingSpot, ...] | None
    effect: str | None
    reason: str | None
    updated_at: MaybeTimestamp
```

## `ParkingNews`

```python
class ParkingNews(ParkingNotice):
    id: str
    url: str | None
    language: str | None
    operator_id: str | None
    operator_name: Name | None
    category: int | None
    attachment_url: str | None
    updated_at: MaybeTimestamp
```

## `ParkingInvoiceType`

```python
class ParkingInvoiceType(BaseModel):
    duplicate_uniform: int | None
    triplicate_uniform: int | None
```

## `ParkingInvoiceSupport`

```python
class ParkingInvoiceSupport(BaseModel):
    ban_printed: int | None
    donation: int | None
```

## `ParkingInvoiceCarrier`

```python
class ParkingInvoiceCarrier(BaseModel):
    generic: int | None
    smart_card: bool | None
    credit_card: bool | None
    debit_card: int | None
    member_card: int | None
    donation_code: int | None
```

## `ParkingPaymentProcess`

```python
class ParkingPaymentProcess(BaseModel):
    pay_and_display: int | None
    pay_by_prepaid_token: int | None
    pay_at_exit_booth_manual_collection: int | None
    pay_at_machine_on_foot_prior_to_exit: int | None
    pay_by_smart_card: int | None
    pay_by_mobile: int | None
    pay_by_etag: int | None
    other: bool | None
```

## `ParkingPaymentMethod`

```python
class ParkingPaymentMethod(BaseModel):
    cash: int | None
    credit_card: bool | None
    smart_card: bool | None
    etc: int | None
    mobile_payment: int | None
    token: int | None
    other: bool | None
```

## `ParkingSmartCard`

```python
class ParkingSmartCard(BaseModel):
    easy_card: int | None
    ipass: int | None
    i_cash: int | None
    happy_cash: int | None
```

## `ParkingTicketingMachine`

```python
class ParkingTicketingMachine(BaseModel):
    number_of_machines: float | None
    height_of_machine_interface: float | None
    disabled_friendly: int | None
    positions: tuple[MaybePosition, ...] | None
```

## `ParkingTicketingValidator`

```python
class ParkingTicketingValidator(BaseModel):
    contactless: int | None
    magnetic: int | None
    nfc: int | None
    rfid: int | None
    other: bool | None
```

## `ParkingTicketing`

```python
class ParkingTicketing(BaseModel):
    id: str
    name: Name | None
    payment_description: str | None
    payment_url: str | None
    mobile_payment_url: str | None
    has_invoice: int | None
    invoice_type: ParkingInvoiceType | None
    invoice_support: ParkingInvoiceSupport | None
    has_e_invoice: int | None
    has_e_invoice_carrier: int | None
    e_invoice_carrier_type: ParkingInvoiceCarrier | None
    payment_process: ParkingPaymentProcess | None
    payment_method: ParkingPaymentMethod | None
    smart_card: ParkingSmartCard | None
    has_ticketing_machine: int | None
    ticketing_machine: ParkingTicketingMachine | None
    has_ticketing_validator: int | None
    ticketing_validator_type: ParkingTicketingValidator | None
    promotion_description: str | None
```

## `StationCarPark`

```python
class StationCarPark(BaseModel):
    station_id: str
    car_park_id: str
    car_park_name: Name | None
    station_name: Name | None
```

## `AirportCarPark`

```python
class AirportCarPark(BaseModel):
    airport_id: str
    terminal: str | None
    car_park_id: str
    car_park_name: Name | None
    airport_name: Name | None
```

## `FreewayCarPark`

```python
class FreewayCarPark(BaseModel):
    service_area_id: str
    car_park_id: str
    car_park_name: Name | None
    service_area_name: Name | None
```