2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Any , Type , Optional , cast
5
+ from typing import Type , Optional , cast
6
6
7
7
import httpx
8
8
23
23
from ....._base_client import (
24
24
make_request_options ,
25
25
)
26
- from .....types .logs .control .cmb import CmbConfig , ConfigDeleteResponse , config_create_params , config_delete_params
26
+ from .....types .logs .control .cmb import CmbConfig , config_create_params , config_delete_params
27
27
28
28
__all__ = ["Config" , "AsyncConfig" ]
29
29
@@ -91,7 +91,7 @@ def delete(
91
91
extra_query : Query | None = None ,
92
92
extra_body : Body | None = None ,
93
93
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
94
- ) -> Optional [ ConfigDeleteResponse ] :
94
+ ) -> object :
95
95
"""
96
96
Deletes CMB config.
97
97
@@ -108,22 +108,17 @@ def delete(
108
108
"""
109
109
if not account_id :
110
110
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
111
- return cast (
112
- Optional [ConfigDeleteResponse ],
113
- self ._delete (
114
- f"/accounts/{ account_id } /logs/control/cmb/config" ,
115
- body = maybe_transform (body , config_delete_params .ConfigDeleteParams ),
116
- options = make_request_options (
117
- extra_headers = extra_headers ,
118
- extra_query = extra_query ,
119
- extra_body = extra_body ,
120
- timeout = timeout ,
121
- post_parser = ResultWrapper ._unwrapper ,
122
- ),
123
- cast_to = cast (
124
- Any , ResultWrapper [ConfigDeleteResponse ]
125
- ), # Union types cannot be passed in as arguments in the type system
111
+ return self ._delete (
112
+ f"/accounts/{ account_id } /logs/control/cmb/config" ,
113
+ body = maybe_transform (body , config_delete_params .ConfigDeleteParams ),
114
+ options = make_request_options (
115
+ extra_headers = extra_headers ,
116
+ extra_query = extra_query ,
117
+ extra_body = extra_body ,
118
+ timeout = timeout ,
119
+ post_parser = ResultWrapper ._unwrapper ,
126
120
),
121
+ cast_to = cast (Type [object ], ResultWrapper [object ]),
127
122
)
128
123
129
124
def get (
@@ -229,7 +224,7 @@ async def delete(
229
224
extra_query : Query | None = None ,
230
225
extra_body : Body | None = None ,
231
226
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
232
- ) -> Optional [ ConfigDeleteResponse ] :
227
+ ) -> object :
233
228
"""
234
229
Deletes CMB config.
235
230
@@ -246,22 +241,17 @@ async def delete(
246
241
"""
247
242
if not account_id :
248
243
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
249
- return cast (
250
- Optional [ConfigDeleteResponse ],
251
- await self ._delete (
252
- f"/accounts/{ account_id } /logs/control/cmb/config" ,
253
- body = await async_maybe_transform (body , config_delete_params .ConfigDeleteParams ),
254
- options = make_request_options (
255
- extra_headers = extra_headers ,
256
- extra_query = extra_query ,
257
- extra_body = extra_body ,
258
- timeout = timeout ,
259
- post_parser = ResultWrapper ._unwrapper ,
260
- ),
261
- cast_to = cast (
262
- Any , ResultWrapper [ConfigDeleteResponse ]
263
- ), # Union types cannot be passed in as arguments in the type system
244
+ return await self ._delete (
245
+ f"/accounts/{ account_id } /logs/control/cmb/config" ,
246
+ body = await async_maybe_transform (body , config_delete_params .ConfigDeleteParams ),
247
+ options = make_request_options (
248
+ extra_headers = extra_headers ,
249
+ extra_query = extra_query ,
250
+ extra_body = extra_body ,
251
+ timeout = timeout ,
252
+ post_parser = ResultWrapper ._unwrapper ,
264
253
),
254
+ cast_to = cast (Type [object ], ResultWrapper [object ]),
265
255
)
266
256
267
257
async def get (
0 commit comments