|
19 | 19 | import json
|
20 | 20 |
|
21 | 21 |
|
22 |
| -from typing import Optional |
23 |
| -from pydantic import BaseModel, Field, StrictBool |
| 22 | +from typing import Optional, Union |
| 23 | +from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt |
24 | 24 |
|
25 | 25 | class TraitOptions(BaseModel):
|
26 | 26 | """
|
27 | 27 | TraitOptions
|
28 | 28 | """
|
29 | 29 | include_historical_data: Optional[StrictBool] = Field(None, alias="includeHistoricalData", description="Determines whether data prior to the computed trait being created is included when determining the computed trait value. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true.")
|
30 | 30 | include_anonymous_users: Optional[StrictBool] = Field(None, alias="includeAnonymousUsers", description="Determines whether anonymous users should be included when determining the computed trait value.")
|
31 |
| - __properties = ["includeHistoricalData", "includeAnonymousUsers"] |
| 31 | + backfill_duration_days: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="backfillDurationDays", description="If specified, the value of this field indicates the number of days, specified from the date the audience was created, that event data will be included from when determining audience membership. If unspecified, defer to the value of `includeHistoricalData` to determine whether historical data is either entirely included or entirely excluded when determining audience membership.") |
| 32 | + __properties = ["includeHistoricalData", "includeAnonymousUsers", "backfillDurationDays"] |
32 | 33 |
|
33 | 34 | class Config:
|
34 | 35 | """Pydantic configuration"""
|
@@ -67,7 +68,8 @@ def from_dict(cls, obj: dict) -> TraitOptions:
|
67 | 68 |
|
68 | 69 | _obj = TraitOptions.parse_obj({
|
69 | 70 | "include_historical_data": obj.get("includeHistoricalData"),
|
70 |
| - "include_anonymous_users": obj.get("includeAnonymousUsers") |
| 71 | + "include_anonymous_users": obj.get("includeAnonymousUsers"), |
| 72 | + "backfill_duration_days": obj.get("backfillDurationDays") |
71 | 73 | })
|
72 | 74 | return _obj
|
73 | 75 |
|
|
0 commit comments