43
43
make_request_options ,
44
44
)
45
45
from ....types .addressing import (
46
- PrefixGetResponse ,
47
- PrefixEditResponse ,
48
- PrefixListResponse ,
49
- PrefixCreateResponse ,
46
+ Prefix ,
50
47
PrefixDeleteResponse ,
51
48
prefix_edit_params ,
52
49
prefix_create_params ,
@@ -86,7 +83,7 @@ def create(
86
83
extra_query : Query | None = None ,
87
84
extra_body : Body | None = None ,
88
85
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
89
- ) -> PrefixCreateResponse :
86
+ ) -> Prefix :
90
87
"""
91
88
Add a new prefix under the account.
92
89
@@ -126,7 +123,7 @@ def create(
126
123
timeout = timeout ,
127
124
post_parser = ResultWrapper ._unwrapper ,
128
125
),
129
- cast_to = cast (Type [PrefixCreateResponse ], ResultWrapper [PrefixCreateResponse ]),
126
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
130
127
)
131
128
132
129
def list (
@@ -139,7 +136,7 @@ def list(
139
136
extra_query : Query | None = None ,
140
137
extra_body : Body | None = None ,
141
138
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
142
- ) -> SyncSinglePage [PrefixListResponse ]:
139
+ ) -> SyncSinglePage [Prefix ]:
143
140
"""
144
141
List all prefixes owned by the account.
145
142
@@ -158,11 +155,11 @@ def list(
158
155
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
159
156
return self ._get_api_list (
160
157
f"/accounts/{ account_id } /addressing/prefixes" ,
161
- page = SyncSinglePage [PrefixListResponse ],
158
+ page = SyncSinglePage [Prefix ],
162
159
options = make_request_options (
163
160
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
164
161
),
165
- model = PrefixListResponse ,
162
+ model = Prefix ,
166
163
)
167
164
168
165
def delete (
@@ -228,7 +225,7 @@ def edit(
228
225
extra_query : Query | None = None ,
229
226
extra_body : Body | None = None ,
230
227
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
231
- ) -> PrefixEditResponse :
228
+ ) -> Prefix :
232
229
"""
233
230
Modify the description for a prefix owned by the account.
234
231
@@ -261,7 +258,7 @@ def edit(
261
258
timeout = timeout ,
262
259
post_parser = ResultWrapper ._unwrapper ,
263
260
),
264
- cast_to = cast (Type [PrefixEditResponse ], ResultWrapper [PrefixEditResponse ]),
261
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
265
262
)
266
263
267
264
def get (
@@ -275,7 +272,7 @@ def get(
275
272
extra_query : Query | None = None ,
276
273
extra_body : Body | None = None ,
277
274
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
278
- ) -> PrefixGetResponse :
275
+ ) -> Prefix :
279
276
"""
280
277
List a particular prefix owned by the account.
281
278
@@ -305,7 +302,7 @@ def get(
305
302
timeout = timeout ,
306
303
post_parser = ResultWrapper ._unwrapper ,
307
304
),
308
- cast_to = cast (Type [PrefixGetResponse ], ResultWrapper [PrefixGetResponse ]),
305
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
309
306
)
310
307
311
308
@@ -339,7 +336,7 @@ async def create(
339
336
extra_query : Query | None = None ,
340
337
extra_body : Body | None = None ,
341
338
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
342
- ) -> PrefixCreateResponse :
339
+ ) -> Prefix :
343
340
"""
344
341
Add a new prefix under the account.
345
342
@@ -379,7 +376,7 @@ async def create(
379
376
timeout = timeout ,
380
377
post_parser = ResultWrapper ._unwrapper ,
381
378
),
382
- cast_to = cast (Type [PrefixCreateResponse ], ResultWrapper [PrefixCreateResponse ]),
379
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
383
380
)
384
381
385
382
def list (
@@ -392,7 +389,7 @@ def list(
392
389
extra_query : Query | None = None ,
393
390
extra_body : Body | None = None ,
394
391
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
395
- ) -> AsyncPaginator [PrefixListResponse , AsyncSinglePage [PrefixListResponse ]]:
392
+ ) -> AsyncPaginator [Prefix , AsyncSinglePage [Prefix ]]:
396
393
"""
397
394
List all prefixes owned by the account.
398
395
@@ -411,11 +408,11 @@ def list(
411
408
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
412
409
return self ._get_api_list (
413
410
f"/accounts/{ account_id } /addressing/prefixes" ,
414
- page = AsyncSinglePage [PrefixListResponse ],
411
+ page = AsyncSinglePage [Prefix ],
415
412
options = make_request_options (
416
413
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
417
414
),
418
- model = PrefixListResponse ,
415
+ model = Prefix ,
419
416
)
420
417
421
418
async def delete (
@@ -481,7 +478,7 @@ async def edit(
481
478
extra_query : Query | None = None ,
482
479
extra_body : Body | None = None ,
483
480
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
484
- ) -> PrefixEditResponse :
481
+ ) -> Prefix :
485
482
"""
486
483
Modify the description for a prefix owned by the account.
487
484
@@ -514,7 +511,7 @@ async def edit(
514
511
timeout = timeout ,
515
512
post_parser = ResultWrapper ._unwrapper ,
516
513
),
517
- cast_to = cast (Type [PrefixEditResponse ], ResultWrapper [PrefixEditResponse ]),
514
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
518
515
)
519
516
520
517
async def get (
@@ -528,7 +525,7 @@ async def get(
528
525
extra_query : Query | None = None ,
529
526
extra_body : Body | None = None ,
530
527
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
531
- ) -> PrefixGetResponse :
528
+ ) -> Prefix :
532
529
"""
533
530
List a particular prefix owned by the account.
534
531
@@ -558,7 +555,7 @@ async def get(
558
555
timeout = timeout ,
559
556
post_parser = ResultWrapper ._unwrapper ,
560
557
),
561
- cast_to = cast (Type [PrefixGetResponse ], ResultWrapper [PrefixGetResponse ]),
558
+ cast_to = cast (Type [Prefix ], ResultWrapper [Prefix ]),
562
559
)
563
560
564
561
0 commit comments