use alloc::borrow::Cow;
use icu_provider::prelude::*;
use tinystr::TinyStr8;
use zerovec::{ZeroMap, ZeroMap2d};
pub use icu_timezone::provider::{MetazoneId, TimeZoneBcp47Id};
use icu_timezone::ZoneVariant;
pub(crate) mod tz {
pub(crate) use super::ExemplarCitiesV1;
pub(crate) use super::ExemplarCitiesV1Marker;
pub(crate) use super::MetazoneGenericNamesLongV1 as MzGenericLongV1;
pub(crate) use super::MetazoneGenericNamesLongV1Marker as MzGenericLongV1Marker;
pub(crate) use super::MetazoneGenericNamesShortV1 as MzGenericShortV1;
pub(crate) use super::MetazoneGenericNamesShortV1Marker as MzGenericShortV1Marker;
pub(crate) use super::MetazoneSpecificNamesLongV1 as MzSpecificLongV1;
pub(crate) use super::MetazoneSpecificNamesLongV1Marker as MzSpecificLongV1Marker;
pub(crate) use super::MetazoneSpecificNamesShortV1 as MzSpecificShortV1;
pub(crate) use super::MetazoneSpecificNamesShortV1Marker as MzSpecificShortV1Marker;
pub(crate) use super::TimeZoneFormatsV1 as EssentialsV1;
pub(crate) use super::TimeZoneFormatsV1Marker as EssentialsV1Marker;
}
#[icu_provider::data_struct(TimeZoneFormatsV1Marker = "time_zone/formats@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct TimeZoneFormatsV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
#[cfg_attr(
feature = "serde",
serde(deserialize_with = "icu_provider::serde_borrow_de_utils::tuple_of_cow")
)]
pub hour_format: (Cow<'data, str>, Cow<'data, str>),
#[cfg_attr(feature = "serde", serde(borrow))]
pub offset_format: Cow<'data, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub offset_zero_format: Cow<'data, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub region_format: Cow<'data, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub region_format_variants: ZeroMap<'data, TinyStr8, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub fallback_format: Cow<'data, str>,
}
#[icu_provider::data_struct(ExemplarCitiesV1Marker = "time_zone/exemplar_cities@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct ExemplarCitiesV1<'data>(
#[cfg_attr(feature = "serde", serde(borrow))] pub ZeroMap<'data, TimeZoneBcp47Id, str>,
);
#[icu_provider::data_struct(MetazoneGenericNamesLongV1Marker = "time_zone/generic_long@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct MetazoneGenericNamesLongV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub defaults: ZeroMap<'data, MetazoneId, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub overrides: ZeroMap<'data, TimeZoneBcp47Id, str>,
}
#[icu_provider::data_struct(MetazoneGenericNamesShortV1Marker = "time_zone/generic_short@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct MetazoneGenericNamesShortV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub defaults: ZeroMap<'data, MetazoneId, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub overrides: ZeroMap<'data, TimeZoneBcp47Id, str>,
}
#[icu_provider::data_struct(MetazoneSpecificNamesLongV1Marker = "time_zone/specific_long@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct MetazoneSpecificNamesLongV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub defaults: ZeroMap2d<'data, MetazoneId, ZoneVariant, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub overrides: ZeroMap2d<'data, TimeZoneBcp47Id, ZoneVariant, str>,
}
#[icu_provider::data_struct(MetazoneSpecificNamesShortV1Marker = "time_zone/specific_short@1")]
#[derive(PartialEq, Debug, Clone, Default)]
#[cfg_attr(feature = "datagen", derive(serde::Serialize, databake::Bake))]
#[cfg_attr(feature = "datagen", databake(path = icu_datetime::provider::time_zones))]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub struct MetazoneSpecificNamesShortV1<'data> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub defaults: ZeroMap2d<'data, MetazoneId, ZoneVariant, str>,
#[cfg_attr(feature = "serde", serde(borrow))]
pub overrides: ZeroMap2d<'data, TimeZoneBcp47Id, ZoneVariant, str>,
}