Module genshin.models.zzz.chronicle.notes
ZZZ sticky notes (real-time notes) models.
Classes
class BatteryCharge (**data: Any)-
Expand source code
class BatteryCharge(APIModel): """ZZZ battery charge model.""" current: int max: int seconds_till_full: int = Aliased("restore") @property def is_full(self) -> bool: """Check if the energy is full.""" return self.current == self.max @property def full_datetime(self) -> datetime.datetime: """Get the datetime when the energy will be full.""" return datetime.datetime.now().astimezone() + datetime.timedelta(seconds=self.seconds_till_full) @pydantic.model_validator(mode="before") @classmethod def __unnest_progress(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: return {**values, **values.pop("progress", {})}ZZZ battery charge model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var current : intvar max : intvar model_config : pydantic.config.ConfigDictvar seconds_till_full : int
Instance variables
prop full_datetime : datetime.datetime-
Expand source code
@property def full_datetime(self) -> datetime.datetime: """Get the datetime when the energy will be full.""" return datetime.datetime.now().astimezone() + datetime.timedelta(seconds=self.seconds_till_full)Get the datetime when the energy will be full.
prop is_full : bool-
Expand source code
@property def is_full(self) -> bool: """Check if the energy is full.""" return self.current == self.maxCheck if the energy is full.
class VideoStoreState (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class VideoStoreState(enum.Enum): """Video store management state.""" REVENUE_AVAILABLE = "SaleStateDone" WAITING_TO_OPEN = "SaleStateNo" CURRENTLY_OPEN = "SaleStateDoing"Video store management state.
Ancestors
- enum.Enum
Class variables
var CURRENTLY_OPENvar REVENUE_AVAILABLEvar WAITING_TO_OPEN
class ZZZEngagement (**data: Any)-
Expand source code
class ZZZEngagement(APIModel): """ZZZ engagement model.""" current: int max: intZZZ engagement model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var current : intvar max : intvar model_config : pydantic.config.ConfigDict
class ZZZMemberCard (**data: Any)-
Expand source code
class ZZZMemberCard(APIModel): """ZZZ Member Card model.""" exp_time: datetime.timedelta is_open: bool member_card_state: ZZZMemberCardState @property def reset_datetime(self) -> datetime.datetime: """The datetime when the member card will be reset.""" return datetime.datetime.now().astimezone() + self.exp_time @pydantic.field_validator("exp_time", mode="before") @classmethod def __parse_currency_refresh(cls, v: str) -> datetime.timedelta: return datetime.timedelta(seconds=int(v))ZZZ Member Card model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var exp_time : datetime.timedeltavar is_open : boolvar member_card_state : genshin.models.zzz.chronicle.notes.ZZZMemberCardStatevar model_config : pydantic.config.ConfigDict
Instance variables
prop reset_datetime : datetime.datetime-
Expand source code
@property def reset_datetime(self) -> datetime.datetime: """The datetime when the member card will be reset.""" return datetime.datetime.now().astimezone() + self.exp_timeThe datetime when the member card will be reset.
class ZZZNotes (**data: Any)-
Expand source code
class ZZZNotes(APIModel): """Zenless Zone Zero sticky notes model.""" battery_charge: BatteryCharge = Aliased("energy") engagement: ZZZEngagement = Aliased("vitality") scratch_card_completed: bool = Aliased("card_sign") video_store_state: VideoStoreState hollow_zero: HollowZero weekly_task: typing.Optional[WeeklyTask] = None card_sign: ZZZCardSignState member_card: ZZZMemberCard temple_running: ZZZTempleRunning @pydantic.field_validator("scratch_card_completed", mode="before") @classmethod def __transform_value(cls, v: typing.Literal["CardSignDone", "CardSignNotDone"]) -> bool: return v == "CardSignDone" @pydantic.model_validator(mode="before") @classmethod def __unnest_value(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: if "video_store_state" not in values: values["video_store_state"] = values["vhs_sale"]["sale_state"] if "hollow_zero" not in values: values["hollow_zero"] = { "bounty_commission": values["bounty_commission"], "survey_points": values["survey_points"], } return valuesZenless Zone Zero sticky notes model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var battery_charge : BatteryChargevar card_sign : genshin.models.zzz.chronicle.notes.ZZZCardSignStatevar engagement : ZZZEngagementvar hollow_zero : genshin.models.zzz.chronicle.notes.HollowZerovar member_card : ZZZMemberCardvar model_config : pydantic.config.ConfigDictvar scratch_card_completed : boolvar temple_running : ZZZTempleRunningvar video_store_state : VideoStoreStatevar weekly_task : genshin.models.zzz.chronicle.notes.WeeklyTask | None
class ZZZTempleRunning (**data: Any)-
Expand source code
class ZZZTempleRunning(APIModel): """ZZZ Suibian Temple Management model.""" bench_state: typing.Union[BenchState, str] currency_next_refresh_ts: datetime.timedelta current_currency: int expedition_state: typing.Union[ExpeditionState, str] level: int shelve_state: typing.Union[ShelveStoreState, str] weekly_currency_max: int auto_work: typing.Optional[ZZZAutoWork] = None @property def reset_datetime(self) -> datetime.datetime: """The datetime when the currency will be reset.""" return datetime.datetime.now().astimezone() + self.currency_next_refresh_ts @pydantic.field_validator("currency_next_refresh_ts", mode="before") @classmethod def __parse_currency_refresh(cls, v: str) -> datetime.timedelta: return datetime.timedelta(seconds=int(v)) @pydantic.field_validator("bench_state", mode="before") @classmethod def __parse_bench_state(cls, v: str) -> typing.Union[BenchState, str]: return prevent_enum_error(v, BenchState) @pydantic.field_validator("expedition_state", mode="before") @classmethod def __parse_expedition_state(cls, v: str) -> typing.Union[ExpeditionState, str]: return prevent_enum_error(v, ExpeditionState) @pydantic.field_validator("shelve_state", mode="before") @classmethod def __parse_shelve_store_state(cls, v: str) -> typing.Union[ShelveStoreState, str]: return prevent_enum_error(v, ShelveStoreState)ZZZ Suibian Temple Management model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var auto_work : genshin.models.zzz.chronicle.notes.ZZZAutoWork | Nonevar bench_state : genshin.models.zzz.chronicle.notes.BenchState | strvar currency_next_refresh_ts : datetime.timedeltavar current_currency : intvar expedition_state : genshin.models.zzz.chronicle.notes.ExpeditionState | strvar level : intvar model_config : pydantic.config.ConfigDictvar shelve_state : genshin.models.zzz.chronicle.notes.ShelveStoreState | strvar weekly_currency_max : int
Instance variables
prop reset_datetime : datetime.datetime-
Expand source code
@property def reset_datetime(self) -> datetime.datetime: """The datetime when the currency will be reset.""" return datetime.datetime.now().astimezone() + self.currency_next_refresh_tsThe datetime when the currency will be reset.