dub 0.34.1__py3-none-any.whl → 0.35.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dub/_version.py +3 -3
- dub/basesdk.py +20 -6
- dub/models/components/__init__.py +108 -26
- dub/models/components/analyticsbrowsers.py +18 -1
- dub/models/components/analyticscities.py +18 -1
- dub/models/components/analyticscontinents.py +18 -1
- dub/models/components/analyticscount.py +18 -1
- dub/models/components/analyticscountries.py +20 -1
- dub/models/components/analyticsdevices.py +18 -1
- dub/models/components/analyticsos.py +18 -1
- dub/models/components/analyticsreferers.py +18 -1
- dub/models/components/analyticsrefererurls.py +18 -1
- dub/models/components/analyticsregions.py +18 -1
- dub/models/components/analyticstimeseries.py +18 -1
- dub/models/components/analyticstoplinks.py +16 -26
- dub/models/components/analyticstopurls.py +18 -1
- dub/models/components/analyticstriggers.py +18 -1
- dub/models/components/commissioncreatedevent.py +96 -64
- dub/models/components/domainschema.py +31 -50
- dub/models/components/folderschema.py +18 -19
- dub/models/components/leadcreatedevent.py +151 -134
- dub/models/components/linkclickedevent.py +57 -70
- dub/models/components/linkschema.py +63 -64
- dub/models/components/linkwebhookevent.py +43 -51
- dub/models/components/partneranalyticscount.py +18 -1
- dub/models/components/partneranalyticstimeseries.py +18 -1
- dub/models/components/partneranalyticstoplinks.py +16 -27
- dub/models/components/partnerapplicationsubmittedevent.py +42 -75
- dub/models/components/partnerenrolledevent.py +477 -83
- dub/models/components/salecreatedevent.py +152 -151
- dub/models/errors/badrequest.py +18 -1
- dub/models/errors/conflict.py +18 -1
- dub/models/errors/forbidden.py +18 -1
- dub/models/errors/internalservererror.py +18 -1
- dub/models/errors/inviteexpired.py +18 -1
- dub/models/errors/notfound.py +18 -1
- dub/models/errors/ratelimitexceeded.py +18 -1
- dub/models/errors/unauthorized.py +18 -1
- dub/models/errors/unprocessableentity.py +18 -1
- dub/models/operations/__init__.py +230 -19
- dub/models/operations/approvebountysubmission.py +71 -45
- dub/models/operations/banpartner.py +14 -19
- dub/models/operations/bulkcreatelinks.py +86 -87
- dub/models/operations/bulkupdatelinks.py +97 -82
- dub/models/operations/checkdomainstatus.py +1 -17
- dub/models/operations/createdomain.py +33 -34
- dub/models/operations/createfolder.py +18 -19
- dub/models/operations/createlink.py +86 -87
- dub/models/operations/createpartner.py +560 -168
- dub/models/operations/createpartnerlink.py +74 -85
- dub/models/operations/createreferralsembedtoken.py +99 -87
- dub/models/operations/createtag.py +18 -1
- dub/models/operations/deactivatepartner.py +65 -0
- dub/models/operations/getcustomer.py +106 -105
- dub/models/operations/getcustomers.py +123 -105
- dub/models/operations/getlinkinfo.py +18 -1
- dub/models/operations/getlinks.py +36 -1
- dub/models/operations/getlinkscount.py +32 -1
- dub/models/operations/getqrcode.py +29 -1
- dub/models/operations/gettags.py +20 -1
- dub/models/operations/listbountysubmissions.py +63 -26
- dub/models/operations/listcommissions.py +129 -64
- dub/models/operations/listdomains.py +18 -1
- dub/models/operations/listevents.py +414 -389
- dub/models/operations/listfolders.py +18 -1
- dub/models/operations/listpartners.py +510 -84
- dub/models/operations/registerdomain.py +1 -17
- dub/models/operations/rejectbountysubmission.py +71 -26
- dub/models/operations/retrieveanalytics.py +65 -66
- dub/models/operations/retrievelinks.py +30 -19
- dub/models/operations/retrievepartneranalytics.py +25 -28
- dub/models/operations/tracklead.py +38 -83
- dub/models/operations/tracksale.py +52 -95
- dub/models/operations/updatecommission.py +126 -64
- dub/models/operations/updatecustomer.py +122 -131
- dub/models/operations/updatedomain.py +50 -35
- dub/models/operations/updatefolder.py +34 -19
- dub/models/operations/updatelink.py +101 -86
- dub/models/operations/updatetag.py +34 -1
- dub/models/operations/upsertlink.py +86 -87
- dub/models/operations/upsertpartnerlink.py +72 -78
- dub/partners.py +288 -0
- dub/sdk.py +0 -3
- dub/utils/__init__.py +10 -1
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/METADATA +4 -8
- dub-0.35.0.dist-info/RECORD +143 -0
- dub/models/components/workspaceschema.py +0 -328
- dub/models/operations/getworkspace.py +0 -21
- dub/models/operations/updateworkspace.py +0 -78
- dub/workspaces.py +0 -561
- dub-0.34.1.dist-info/RECORD +0 -146
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/WHEEL +0 -0
- {dub-0.34.1.dist-info → dub-0.35.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -305,75 +305,74 @@ class LinkSchema(BaseModel):
|
|
|
305
305
|
|
|
306
306
|
@model_serializer(mode="wrap")
|
|
307
307
|
def serialize_model(self, handler):
|
|
308
|
-
optional_fields =
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
308
|
+
optional_fields = set(
|
|
309
|
+
[
|
|
310
|
+
"trackConversion",
|
|
311
|
+
"archived",
|
|
312
|
+
"proxy",
|
|
313
|
+
"rewrite",
|
|
314
|
+
"doIndex",
|
|
315
|
+
"publicStats",
|
|
316
|
+
"testVariants",
|
|
317
|
+
"testStartedAt",
|
|
318
|
+
"testCompletedAt",
|
|
319
|
+
"clicks",
|
|
320
|
+
"leads",
|
|
321
|
+
"conversions",
|
|
322
|
+
"sales",
|
|
323
|
+
"saleAmount",
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
nullable_fields = set(
|
|
327
|
+
[
|
|
328
|
+
"externalId",
|
|
329
|
+
"tenantId",
|
|
330
|
+
"programId",
|
|
331
|
+
"partnerId",
|
|
332
|
+
"expiresAt",
|
|
333
|
+
"expiredUrl",
|
|
334
|
+
"disabledAt",
|
|
335
|
+
"password",
|
|
336
|
+
"title",
|
|
337
|
+
"description",
|
|
338
|
+
"image",
|
|
339
|
+
"video",
|
|
340
|
+
"ios",
|
|
341
|
+
"android",
|
|
342
|
+
"geo",
|
|
343
|
+
"tags",
|
|
344
|
+
"folderId",
|
|
345
|
+
"comments",
|
|
346
|
+
"utm_source",
|
|
347
|
+
"utm_medium",
|
|
348
|
+
"utm_campaign",
|
|
349
|
+
"utm_term",
|
|
350
|
+
"utm_content",
|
|
351
|
+
"testVariants",
|
|
352
|
+
"testStartedAt",
|
|
353
|
+
"testCompletedAt",
|
|
354
|
+
"userId",
|
|
355
|
+
"lastClicked",
|
|
356
|
+
"tagId",
|
|
357
|
+
]
|
|
358
|
+
)
|
|
357
359
|
serialized = handler(self)
|
|
358
|
-
|
|
359
360
|
m = {}
|
|
360
361
|
|
|
361
362
|
for n, f in type(self).model_fields.items():
|
|
362
363
|
k = f.alias or n
|
|
363
364
|
val = serialized.get(k)
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
):
|
|
377
|
-
m[k] = val
|
|
365
|
+
is_nullable_and_explicitly_set = (
|
|
366
|
+
k in nullable_fields
|
|
367
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
if val != UNSET_SENTINEL:
|
|
371
|
+
if (
|
|
372
|
+
val is not None
|
|
373
|
+
or k not in optional_fields
|
|
374
|
+
or is_nullable_and_explicitly_set
|
|
375
|
+
):
|
|
376
|
+
m[k] = val
|
|
378
377
|
|
|
379
378
|
return m
|
|
@@ -283,63 +283,55 @@ class Data(BaseModel):
|
|
|
283
283
|
|
|
284
284
|
@model_serializer(mode="wrap")
|
|
285
285
|
def serialize_model(self, handler):
|
|
286
|
-
optional_fields =
|
|
287
|
-
"testVariants",
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
"userId",
|
|
318
|
-
"tagId",
|
|
319
|
-
]
|
|
320
|
-
null_default_fields = []
|
|
321
|
-
|
|
286
|
+
optional_fields = set(
|
|
287
|
+
["testVariants", "clicks", "leads", "conversions", "sales", "saleAmount"]
|
|
288
|
+
)
|
|
289
|
+
nullable_fields = set(
|
|
290
|
+
[
|
|
291
|
+
"externalId",
|
|
292
|
+
"tenantId",
|
|
293
|
+
"programId",
|
|
294
|
+
"partnerId",
|
|
295
|
+
"expiredUrl",
|
|
296
|
+
"password",
|
|
297
|
+
"title",
|
|
298
|
+
"description",
|
|
299
|
+
"image",
|
|
300
|
+
"video",
|
|
301
|
+
"ios",
|
|
302
|
+
"android",
|
|
303
|
+
"geo",
|
|
304
|
+
"tags",
|
|
305
|
+
"folderId",
|
|
306
|
+
"comments",
|
|
307
|
+
"utm_source",
|
|
308
|
+
"utm_medium",
|
|
309
|
+
"utm_campaign",
|
|
310
|
+
"utm_term",
|
|
311
|
+
"utm_content",
|
|
312
|
+
"testVariants",
|
|
313
|
+
"userId",
|
|
314
|
+
"tagId",
|
|
315
|
+
]
|
|
316
|
+
)
|
|
322
317
|
serialized = handler(self)
|
|
323
|
-
|
|
324
318
|
m = {}
|
|
325
319
|
|
|
326
320
|
for n, f in type(self).model_fields.items():
|
|
327
321
|
k = f.alias or n
|
|
328
322
|
val = serialized.get(k)
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
):
|
|
342
|
-
m[k] = val
|
|
323
|
+
is_nullable_and_explicitly_set = (
|
|
324
|
+
k in nullable_fields
|
|
325
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
if val != UNSET_SENTINEL:
|
|
329
|
+
if (
|
|
330
|
+
val is not None
|
|
331
|
+
or k not in optional_fields
|
|
332
|
+
or is_nullable_and_explicitly_set
|
|
333
|
+
):
|
|
334
|
+
m[k] = val
|
|
343
335
|
|
|
344
336
|
return m
|
|
345
337
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -33,3 +34,19 @@ class PartnerAnalyticsCount(BaseModel):
|
|
|
33
34
|
r"""The total amount of sales, in cents"""
|
|
34
35
|
|
|
35
36
|
earnings: Optional[float] = 0
|
|
37
|
+
|
|
38
|
+
@model_serializer(mode="wrap")
|
|
39
|
+
def serialize_model(self, handler):
|
|
40
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount", "earnings"])
|
|
41
|
+
serialized = handler(self)
|
|
42
|
+
m = {}
|
|
43
|
+
|
|
44
|
+
for n, f in type(self).model_fields.items():
|
|
45
|
+
k = f.alias or n
|
|
46
|
+
val = serialized.get(k)
|
|
47
|
+
|
|
48
|
+
if val != UNSET_SENTINEL:
|
|
49
|
+
if val is not None or k not in optional_fields:
|
|
50
|
+
m[k] = val
|
|
51
|
+
|
|
52
|
+
return m
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from dub.types import BaseModel
|
|
4
|
+
from dub.types import BaseModel, UNSET_SENTINEL
|
|
5
5
|
import pydantic
|
|
6
|
+
from pydantic import model_serializer
|
|
6
7
|
from typing import Optional
|
|
7
8
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
8
9
|
|
|
@@ -38,3 +39,19 @@ class PartnerAnalyticsTimeseries(BaseModel):
|
|
|
38
39
|
r"""The total amount of sales in the interval, in cents"""
|
|
39
40
|
|
|
40
41
|
earnings: Optional[float] = 0
|
|
42
|
+
|
|
43
|
+
@model_serializer(mode="wrap")
|
|
44
|
+
def serialize_model(self, handler):
|
|
45
|
+
optional_fields = set(["clicks", "leads", "sales", "saleAmount", "earnings"])
|
|
46
|
+
serialized = handler(self)
|
|
47
|
+
m = {}
|
|
48
|
+
|
|
49
|
+
for n, f in type(self).model_fields.items():
|
|
50
|
+
k = f.alias or n
|
|
51
|
+
val = serialized.get(k)
|
|
52
|
+
|
|
53
|
+
if val != UNSET_SENTINEL:
|
|
54
|
+
if val is not None or k not in optional_fields:
|
|
55
|
+
m[k] = val
|
|
56
|
+
|
|
57
|
+
return m
|
|
@@ -87,38 +87,27 @@ class PartnerAnalyticsTopLinks(BaseModel):
|
|
|
87
87
|
|
|
88
88
|
@model_serializer(mode="wrap")
|
|
89
89
|
def serialize_model(self, handler):
|
|
90
|
-
optional_fields =
|
|
91
|
-
"comments",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"leads",
|
|
95
|
-
"sales",
|
|
96
|
-
"saleAmount",
|
|
97
|
-
"earnings",
|
|
98
|
-
]
|
|
99
|
-
nullable_fields = ["comments", "title"]
|
|
100
|
-
null_default_fields = []
|
|
101
|
-
|
|
90
|
+
optional_fields = set(
|
|
91
|
+
["comments", "title", "clicks", "leads", "sales", "saleAmount", "earnings"]
|
|
92
|
+
)
|
|
93
|
+
nullable_fields = set(["comments", "title"])
|
|
102
94
|
serialized = handler(self)
|
|
103
|
-
|
|
104
95
|
m = {}
|
|
105
96
|
|
|
106
97
|
for n, f in type(self).model_fields.items():
|
|
107
98
|
k = f.alias or n
|
|
108
99
|
val = serialized.get(k)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
):
|
|
122
|
-
m[k] = val
|
|
100
|
+
is_nullable_and_explicitly_set = (
|
|
101
|
+
k in nullable_fields
|
|
102
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
if val != UNSET_SENTINEL:
|
|
106
|
+
if (
|
|
107
|
+
val is not None
|
|
108
|
+
or k not in optional_fields
|
|
109
|
+
or is_nullable_and_explicitly_set
|
|
110
|
+
):
|
|
111
|
+
m[k] = val
|
|
123
112
|
|
|
124
113
|
return m
|
|
@@ -107,53 +107,52 @@ class PartnerApplicationSubmittedEventPartner(BaseModel):
|
|
|
107
107
|
|
|
108
108
|
@model_serializer(mode="wrap")
|
|
109
109
|
def serialize_model(self, handler):
|
|
110
|
-
optional_fields =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
110
|
+
optional_fields = set(
|
|
111
|
+
[
|
|
112
|
+
"description",
|
|
113
|
+
"groupId",
|
|
114
|
+
"website",
|
|
115
|
+
"youtube",
|
|
116
|
+
"twitter",
|
|
117
|
+
"linkedin",
|
|
118
|
+
"instagram",
|
|
119
|
+
"tiktok",
|
|
120
|
+
]
|
|
121
|
+
)
|
|
122
|
+
nullable_fields = set(
|
|
123
|
+
[
|
|
124
|
+
"companyName",
|
|
125
|
+
"email",
|
|
126
|
+
"image",
|
|
127
|
+
"description",
|
|
128
|
+
"country",
|
|
129
|
+
"groupId",
|
|
130
|
+
"website",
|
|
131
|
+
"youtube",
|
|
132
|
+
"twitter",
|
|
133
|
+
"linkedin",
|
|
134
|
+
"instagram",
|
|
135
|
+
"tiktok",
|
|
136
|
+
]
|
|
137
|
+
)
|
|
136
138
|
serialized = handler(self)
|
|
137
|
-
|
|
138
139
|
m = {}
|
|
139
140
|
|
|
140
141
|
for n, f in type(self).model_fields.items():
|
|
141
142
|
k = f.alias or n
|
|
142
143
|
val = serialized.get(k)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
):
|
|
156
|
-
m[k] = val
|
|
144
|
+
is_nullable_and_explicitly_set = (
|
|
145
|
+
k in nullable_fields
|
|
146
|
+
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
if val != UNSET_SENTINEL:
|
|
150
|
+
if (
|
|
151
|
+
val is not None
|
|
152
|
+
or k not in optional_fields
|
|
153
|
+
or is_nullable_and_explicitly_set
|
|
154
|
+
):
|
|
155
|
+
m[k] = val
|
|
157
156
|
|
|
158
157
|
return m
|
|
159
158
|
|
|
@@ -170,30 +169,14 @@ class ApplicationFormData(BaseModel):
|
|
|
170
169
|
|
|
171
170
|
@model_serializer(mode="wrap")
|
|
172
171
|
def serialize_model(self, handler):
|
|
173
|
-
optional_fields = []
|
|
174
|
-
nullable_fields = ["value"]
|
|
175
|
-
null_default_fields = []
|
|
176
|
-
|
|
177
172
|
serialized = handler(self)
|
|
178
|
-
|
|
179
173
|
m = {}
|
|
180
174
|
|
|
181
175
|
for n, f in type(self).model_fields.items():
|
|
182
176
|
k = f.alias or n
|
|
183
177
|
val = serialized.get(k)
|
|
184
|
-
serialized.pop(k, None)
|
|
185
|
-
|
|
186
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
187
|
-
is_set = (
|
|
188
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
189
|
-
or k in null_default_fields
|
|
190
|
-
) # pylint: disable=no-member
|
|
191
178
|
|
|
192
|
-
if val
|
|
193
|
-
m[k] = val
|
|
194
|
-
elif val != UNSET_SENTINEL and (
|
|
195
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
196
|
-
):
|
|
179
|
+
if val != UNSET_SENTINEL:
|
|
197
180
|
m[k] = val
|
|
198
181
|
|
|
199
182
|
return m
|
|
@@ -219,30 +202,14 @@ class PartnerApplicationSubmittedEventData(BaseModel):
|
|
|
219
202
|
|
|
220
203
|
@model_serializer(mode="wrap")
|
|
221
204
|
def serialize_model(self, handler):
|
|
222
|
-
optional_fields = []
|
|
223
|
-
nullable_fields = ["applicationFormData"]
|
|
224
|
-
null_default_fields = []
|
|
225
|
-
|
|
226
205
|
serialized = handler(self)
|
|
227
|
-
|
|
228
206
|
m = {}
|
|
229
207
|
|
|
230
208
|
for n, f in type(self).model_fields.items():
|
|
231
209
|
k = f.alias or n
|
|
232
210
|
val = serialized.get(k)
|
|
233
|
-
serialized.pop(k, None)
|
|
234
|
-
|
|
235
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
|
236
|
-
is_set = (
|
|
237
|
-
self.__pydantic_fields_set__.intersection({n})
|
|
238
|
-
or k in null_default_fields
|
|
239
|
-
) # pylint: disable=no-member
|
|
240
211
|
|
|
241
|
-
if val
|
|
242
|
-
m[k] = val
|
|
243
|
-
elif val != UNSET_SENTINEL and (
|
|
244
|
-
not k in optional_fields or (optional_nullable and is_set)
|
|
245
|
-
):
|
|
212
|
+
if val != UNSET_SENTINEL:
|
|
246
213
|
m[k] = val
|
|
247
214
|
|
|
248
215
|
return m
|