7
7
from ...client import Client
8
8
from ...models .an_enum import AnEnum
9
9
from ...models .http_validation_error import HTTPValidationError
10
- from ...types import UNSET , Response
10
+ from ...types import UNSET , Response , Unset
11
11
12
12
13
13
def _get_kwargs (
14
14
* ,
15
15
client : Client ,
16
16
json_body : Dict [Any , Any ],
17
- string_prop : str = "the default string" ,
18
- datetime_prop : datetime .datetime = isoparse ("1010-10-10T00:00:00" ),
19
- date_prop : datetime .date = isoparse ("1010-10-10" ).date (),
20
- float_prop : float = 3.14 ,
21
- int_prop : int = 7 ,
22
- boolean_prop : bool = cast ( bool , UNSET ) ,
23
- list_prop : List [ AnEnum ] = cast ( List [AnEnum ], UNSET ) ,
24
- union_prop : Union [float , str ] = "not a float" ,
25
- enum_prop : AnEnum = cast ( AnEnum , UNSET ) ,
17
+ string_prop : Union [ Unset , str ] = "the default string" ,
18
+ datetime_prop : Union [ Unset , datetime .datetime ] = isoparse ("1010-10-10T00:00:00" ),
19
+ date_prop : Union [ Unset , datetime .date ] = isoparse ("1010-10-10" ).date (),
20
+ float_prop : Union [ Unset , float ] = 3.14 ,
21
+ int_prop : Union [ Unset , int ] = 7 ,
22
+ boolean_prop : Union [ Unset , bool ] = UNSET ,
23
+ list_prop : Union [ Unset , List [AnEnum ]] = UNSET ,
24
+ union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = "not a float" ,
25
+ enum_prop : Union [ Unset , AnEnum ] = UNSET ,
26
26
) -> Dict [str , Any ]:
27
27
url = "{}/tests/defaults" .format (client .base_url )
28
28
@@ -48,7 +48,7 @@ def _get_kwargs(
48
48
json_list_prop .append (list_prop_item )
49
49
50
50
if union_prop is UNSET :
51
- json_union_prop : Union [float , str ] = UNSET
51
+ json_union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = UNSET
52
52
elif isinstance (union_prop , float ):
53
53
json_union_prop = union_prop
54
54
else :
@@ -112,15 +112,15 @@ def sync_detailed(
112
112
* ,
113
113
client : Client ,
114
114
json_body : Dict [Any , Any ],
115
- string_prop : str = "the default string" ,
116
- datetime_prop : datetime .datetime = isoparse ("1010-10-10T00:00:00" ),
117
- date_prop : datetime .date = isoparse ("1010-10-10" ).date (),
118
- float_prop : float = 3.14 ,
119
- int_prop : int = 7 ,
120
- boolean_prop : bool = cast ( bool , UNSET ) ,
121
- list_prop : List [ AnEnum ] = cast ( List [AnEnum ], UNSET ) ,
122
- union_prop : Union [float , str ] = "not a float" ,
123
- enum_prop : AnEnum = cast ( AnEnum , UNSET ) ,
115
+ string_prop : Union [ Unset , str ] = "the default string" ,
116
+ datetime_prop : Union [ Unset , datetime .datetime ] = isoparse ("1010-10-10T00:00:00" ),
117
+ date_prop : Union [ Unset , datetime .date ] = isoparse ("1010-10-10" ).date (),
118
+ float_prop : Union [ Unset , float ] = 3.14 ,
119
+ int_prop : Union [ Unset , int ] = 7 ,
120
+ boolean_prop : Union [ Unset , bool ] = UNSET ,
121
+ list_prop : Union [ Unset , List [AnEnum ]] = UNSET ,
122
+ union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = "not a float" ,
123
+ enum_prop : Union [ Unset , AnEnum ] = UNSET ,
124
124
) -> Response [Union [None , HTTPValidationError ]]:
125
125
kwargs = _get_kwargs (
126
126
client = client ,
@@ -147,15 +147,15 @@ def sync(
147
147
* ,
148
148
client : Client ,
149
149
json_body : Dict [Any , Any ],
150
- string_prop : str = "the default string" ,
151
- datetime_prop : datetime .datetime = isoparse ("1010-10-10T00:00:00" ),
152
- date_prop : datetime .date = isoparse ("1010-10-10" ).date (),
153
- float_prop : float = 3.14 ,
154
- int_prop : int = 7 ,
155
- boolean_prop : bool = cast ( bool , UNSET ) ,
156
- list_prop : List [ AnEnum ] = cast ( List [AnEnum ], UNSET ) ,
157
- union_prop : Union [float , str ] = "not a float" ,
158
- enum_prop : AnEnum = cast ( AnEnum , UNSET ) ,
150
+ string_prop : Union [ Unset , str ] = "the default string" ,
151
+ datetime_prop : Union [ Unset , datetime .datetime ] = isoparse ("1010-10-10T00:00:00" ),
152
+ date_prop : Union [ Unset , datetime .date ] = isoparse ("1010-10-10" ).date (),
153
+ float_prop : Union [ Unset , float ] = 3.14 ,
154
+ int_prop : Union [ Unset , int ] = 7 ,
155
+ boolean_prop : Union [ Unset , bool ] = UNSET ,
156
+ list_prop : Union [ Unset , List [AnEnum ]] = UNSET ,
157
+ union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = "not a float" ,
158
+ enum_prop : Union [ Unset , AnEnum ] = UNSET ,
159
159
) -> Optional [Union [None , HTTPValidationError ]]:
160
160
""" """
161
161
@@ -178,15 +178,15 @@ async def asyncio_detailed(
178
178
* ,
179
179
client : Client ,
180
180
json_body : Dict [Any , Any ],
181
- string_prop : str = "the default string" ,
182
- datetime_prop : datetime .datetime = isoparse ("1010-10-10T00:00:00" ),
183
- date_prop : datetime .date = isoparse ("1010-10-10" ).date (),
184
- float_prop : float = 3.14 ,
185
- int_prop : int = 7 ,
186
- boolean_prop : bool = cast ( bool , UNSET ) ,
187
- list_prop : List [ AnEnum ] = cast ( List [AnEnum ], UNSET ) ,
188
- union_prop : Union [float , str ] = "not a float" ,
189
- enum_prop : AnEnum = cast ( AnEnum , UNSET ) ,
181
+ string_prop : Union [ Unset , str ] = "the default string" ,
182
+ datetime_prop : Union [ Unset , datetime .datetime ] = isoparse ("1010-10-10T00:00:00" ),
183
+ date_prop : Union [ Unset , datetime .date ] = isoparse ("1010-10-10" ).date (),
184
+ float_prop : Union [ Unset , float ] = 3.14 ,
185
+ int_prop : Union [ Unset , int ] = 7 ,
186
+ boolean_prop : Union [ Unset , bool ] = UNSET ,
187
+ list_prop : Union [ Unset , List [AnEnum ]] = UNSET ,
188
+ union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = "not a float" ,
189
+ enum_prop : Union [ Unset , AnEnum ] = UNSET ,
190
190
) -> Response [Union [None , HTTPValidationError ]]:
191
191
kwargs = _get_kwargs (
192
192
client = client ,
@@ -212,15 +212,15 @@ async def asyncio(
212
212
* ,
213
213
client : Client ,
214
214
json_body : Dict [Any , Any ],
215
- string_prop : str = "the default string" ,
216
- datetime_prop : datetime .datetime = isoparse ("1010-10-10T00:00:00" ),
217
- date_prop : datetime .date = isoparse ("1010-10-10" ).date (),
218
- float_prop : float = 3.14 ,
219
- int_prop : int = 7 ,
220
- boolean_prop : bool = cast ( bool , UNSET ) ,
221
- list_prop : List [ AnEnum ] = cast ( List [AnEnum ], UNSET ) ,
222
- union_prop : Union [float , str ] = "not a float" ,
223
- enum_prop : AnEnum = cast ( AnEnum , UNSET ) ,
215
+ string_prop : Union [ Unset , str ] = "the default string" ,
216
+ datetime_prop : Union [ Unset , datetime .datetime ] = isoparse ("1010-10-10T00:00:00" ),
217
+ date_prop : Union [ Unset , datetime .date ] = isoparse ("1010-10-10" ).date (),
218
+ float_prop : Union [ Unset , float ] = 3.14 ,
219
+ int_prop : Union [ Unset , int ] = 7 ,
220
+ boolean_prop : Union [ Unset , bool ] = UNSET ,
221
+ list_prop : Union [ Unset , List [AnEnum ]] = UNSET ,
222
+ union_prop : Union [Unset , Union [ Union [ Unset , float ], Union [ Unset , str ]] ] = "not a float" ,
223
+ enum_prop : Union [ Unset , AnEnum ] = UNSET ,
224
224
) -> Optional [Union [None , HTTPValidationError ]]:
225
225
""" """
226
226
0 commit comments