55from dataclasses import dataclass
66from datetime import UTC , datetime
77from decimal import Decimal
8- from typing import TYPE_CHECKING , Annotated , Literal , Protocol , TypedDict
8+ from typing import TYPE_CHECKING , Literal , Protocol , TypedDict
99
10- from pydantic import Field
10+ from pydantic import ConfigDict
11+ from pydantic .alias_generators import to_camel
1112
1213import apify_client ._models as _client_models
1314from apify_client ._models import ActorChargeEvent as ClientActorChargeEvent
5657class ActorChargeEvent (ClientActorChargeEvent ):
5758 """Definition of a single chargeable event in the pay-per-event pricing model."""
5859
59- event_description : Annotated [str | None , Field (alias = 'eventDescription' )] = None
60+ model_config = ConfigDict (alias_generator = to_camel )
61+
62+ event_description : str | None = None
6063 """Human-readable description of the event.
6164
6265 Required in apify-client but omitted from the env var, so it is relaxed to optional.
@@ -67,75 +70,85 @@ class ActorChargeEvent(ClientActorChargeEvent):
6770class PricingPerEvent (ClientPricingPerEvent ):
6871 """Pay-per-event pricing details - the chargeable events and their prices."""
6972
70- actor_charge_events : Annotated [dict [str , ActorChargeEvent ] | None , Field (alias = 'actorChargeEvents' )] = None
73+ model_config = ConfigDict (alias_generator = to_camel )
74+
75+ actor_charge_events : dict [str , ActorChargeEvent ] | None = None
7176 """Mapping of event name to its charge definition."""
7277
7378
7479@docs_group ('Charging' )
7580class FreeActorPricingInfo (ClientFree ):
7681 """Pricing info for an Actor offered free of charge."""
7782
78- apify_margin_percentage : Annotated [float | None , Field (alias = 'apifyMarginPercentage' )] = None
83+ model_config = ConfigDict (alias_generator = to_camel )
84+
85+ apify_margin_percentage : float | None = None
7986 """Apify's margin on the price, as a percentage."""
8087
81- created_at : Annotated [ datetime | None , Field ( alias = 'createdAt' )] = None
88+ created_at : datetime | None = None
8289 """Timestamp when this pricing info was created."""
8390
84- started_at : Annotated [ datetime | None , Field ( alias = 'startedAt' )] = None
91+ started_at : datetime | None = None
8592 """Timestamp when this pricing became effective."""
8693
8794
8895@docs_group ('Charging' )
8996class FlatPricePerMonthActorPricingInfo (ClientFlatPricePerMonth ):
9097 """Pricing info for an Actor billed at a flat monthly price."""
9198
92- apify_margin_percentage : Annotated [float | None , Field (alias = 'apifyMarginPercentage' )] = None
99+ model_config = ConfigDict (alias_generator = to_camel )
100+
101+ apify_margin_percentage : float | None = None
93102 """Apify's margin on the price, as a percentage."""
94103
95- created_at : Annotated [ datetime | None , Field ( alias = 'createdAt' )] = None
104+ created_at : datetime | None = None
96105 """Timestamp when this pricing info was created."""
97106
98- started_at : Annotated [ datetime | None , Field ( alias = 'startedAt' )] = None
107+ started_at : datetime | None = None
99108 """Timestamp when this pricing became effective."""
100109
101- trial_minutes : Annotated [ int | None , Field ( alias = 'trialMinutes' )] = None
110+ trial_minutes : int | None = None
102111 """Length of the free trial period, in minutes."""
103112
104- price_per_unit_usd : Annotated [ float | None , Field ( alias = 'pricePerUnitUsd' )] = None
113+ price_per_unit_usd : float | None = None
105114 """Price per unit, in USD."""
106115
107116
108117@docs_group ('Charging' )
109118class PricePerDatasetItemActorPricingInfo (ClientPricePerDatasetItem ):
110119 """Pricing info for an Actor billed per dataset item produced."""
111120
112- apify_margin_percentage : Annotated [float | None , Field (alias = 'apifyMarginPercentage' )] = None
121+ model_config = ConfigDict (alias_generator = to_camel )
122+
123+ apify_margin_percentage : float | None = None
113124 """Apify's margin on the price, as a percentage."""
114125
115- created_at : Annotated [ datetime | None , Field ( alias = 'createdAt' )] = None
126+ created_at : datetime | None = None
116127 """Timestamp when this pricing info was created."""
117128
118- started_at : Annotated [ datetime | None , Field ( alias = 'startedAt' )] = None
129+ started_at : datetime | None = None
119130 """Timestamp when this pricing became effective."""
120131
121- unit_name : Annotated [ str | None , Field ( alias = 'unitName' )] = None
132+ unit_name : str | None = None
122133 """Name of the billed unit."""
123134
124135
125136@docs_group ('Charging' )
126137class PayPerEventActorPricingInfo (ClientPayPerEvent ):
127138 """Pricing info for an Actor billed per charged event."""
128139
129- apify_margin_percentage : Annotated [float | None , Field (alias = 'apifyMarginPercentage' )] = None
140+ model_config = ConfigDict (alias_generator = to_camel )
141+
142+ apify_margin_percentage : float | None = None
130143 """Apify's margin on the price, as a percentage."""
131144
132- created_at : Annotated [ datetime | None , Field ( alias = 'createdAt' )] = None
145+ created_at : datetime | None = None
133146 """Timestamp when this pricing info was created."""
134147
135- started_at : Annotated [ datetime | None , Field ( alias = 'startedAt' )] = None
148+ started_at : datetime | None = None
136149 """Timestamp when this pricing became effective."""
137150
138- pricing_per_event : Annotated [ PricingPerEvent , Field ( alias = 'pricingPerEvent' )]
151+ pricing_per_event : PricingPerEvent
139152 """The pay-per-event pricing details."""
140153
141154
0 commit comments