22
33from __future__ import annotations
44
5+ import typing_extensions
56from typing import Dict , Optional
67
78import httpx
@@ -123,6 +124,7 @@ def create(
123124 cast_to = TaskIDList ,
124125 )
125126
127+ @typing_extensions .deprecated ("deprecated" )
126128 def update (
127129 self ,
128130 floating_ip_id : str ,
@@ -138,7 +140,8 @@ def update(
138140 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
139141 ) -> FloatingIP :
140142 """
141- Update floating IP
143+ **Deprecated**: Use PATCH
144+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
142145
143146 Args:
144147 project_id: Project ID
@@ -313,6 +316,7 @@ def delete(
313316 cast_to = TaskIDList ,
314317 )
315318
319+ @typing_extensions .deprecated ("deprecated" )
316320 def assign (
317321 self ,
318322 floating_ip_id : str ,
@@ -331,7 +335,16 @@ def assign(
331335 """
332336 Assign floating IP to instance or loadbalancer
333337
338+ **Deprecated**: Use PATCH
339+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
340+
334341 Args:
342+ project_id: Project ID
343+
344+ region_id: Region ID
345+
346+ floating_ip_id: Floating IP ID
347+
335348 port_id: Port ID
336349
337350 fixed_ip_address: Fixed IP address
@@ -410,6 +423,7 @@ def get(
410423 cast_to = FloatingIP ,
411424 )
412425
426+ @typing_extensions .deprecated ("deprecated" )
413427 def unassign (
414428 self ,
415429 floating_ip_id : str ,
@@ -424,9 +438,16 @@ def unassign(
424438 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
425439 ) -> FloatingIP :
426440 """
427- Unassign floating IP
441+ **Deprecated**: Use PATCH
442+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
428443
429444 Args:
445+ project_id: Project ID
446+
447+ region_id: Region ID
448+
449+ floating_ip_id: Floating IP ID
450+
430451 extra_headers: Send extra headers
431452
432453 extra_query: Add additional query parameters to the request
@@ -627,6 +648,7 @@ async def create(
627648 cast_to = TaskIDList ,
628649 )
629650
651+ @typing_extensions .deprecated ("deprecated" )
630652 async def update (
631653 self ,
632654 floating_ip_id : str ,
@@ -642,7 +664,8 @@ async def update(
642664 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
643665 ) -> FloatingIP :
644666 """
645- Update floating IP
667+ **Deprecated**: Use PATCH
668+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
646669
647670 Args:
648671 project_id: Project ID
@@ -817,6 +840,7 @@ async def delete(
817840 cast_to = TaskIDList ,
818841 )
819842
843+ @typing_extensions .deprecated ("deprecated" )
820844 async def assign (
821845 self ,
822846 floating_ip_id : str ,
@@ -835,7 +859,16 @@ async def assign(
835859 """
836860 Assign floating IP to instance or loadbalancer
837861
862+ **Deprecated**: Use PATCH
863+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
864+
838865 Args:
866+ project_id: Project ID
867+
868+ region_id: Region ID
869+
870+ floating_ip_id: Floating IP ID
871+
839872 port_id: Port ID
840873
841874 fixed_ip_address: Fixed IP address
@@ -914,6 +947,7 @@ async def get(
914947 cast_to = FloatingIP ,
915948 )
916949
950+ @typing_extensions .deprecated ("deprecated" )
917951 async def unassign (
918952 self ,
919953 floating_ip_id : str ,
@@ -928,9 +962,16 @@ async def unassign(
928962 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
929963 ) -> FloatingIP :
930964 """
931- Unassign floating IP
965+ **Deprecated**: Use PATCH
966+ /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
932967
933968 Args:
969+ project_id: Project ID
970+
971+ region_id: Region ID
972+
973+ floating_ip_id: Floating IP ID
974+
934975 extra_headers: Send extra headers
935976
936977 extra_query: Add additional query parameters to the request
@@ -1049,23 +1090,29 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
10491090 self .create = to_raw_response_wrapper (
10501091 floating_ips .create ,
10511092 )
1052- self .update = to_raw_response_wrapper (
1053- floating_ips .update ,
1093+ self .update = ( # pyright: ignore[reportDeprecated]
1094+ to_raw_response_wrapper (
1095+ floating_ips .update , # pyright: ignore[reportDeprecated],
1096+ )
10541097 )
10551098 self .list = to_raw_response_wrapper (
10561099 floating_ips .list ,
10571100 )
10581101 self .delete = to_raw_response_wrapper (
10591102 floating_ips .delete ,
10601103 )
1061- self .assign = to_raw_response_wrapper (
1062- floating_ips .assign ,
1104+ self .assign = ( # pyright: ignore[reportDeprecated]
1105+ to_raw_response_wrapper (
1106+ floating_ips .assign , # pyright: ignore[reportDeprecated],
1107+ )
10631108 )
10641109 self .get = to_raw_response_wrapper (
10651110 floating_ips .get ,
10661111 )
1067- self .unassign = to_raw_response_wrapper (
1068- floating_ips .unassign ,
1112+ self .unassign = ( # pyright: ignore[reportDeprecated]
1113+ to_raw_response_wrapper (
1114+ floating_ips .unassign , # pyright: ignore[reportDeprecated],
1115+ )
10691116 )
10701117 self .create_and_poll = to_raw_response_wrapper (
10711118 floating_ips .create_and_poll ,
@@ -1082,23 +1129,29 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
10821129 self .create = async_to_raw_response_wrapper (
10831130 floating_ips .create ,
10841131 )
1085- self .update = async_to_raw_response_wrapper (
1086- floating_ips .update ,
1132+ self .update = ( # pyright: ignore[reportDeprecated]
1133+ async_to_raw_response_wrapper (
1134+ floating_ips .update , # pyright: ignore[reportDeprecated],
1135+ )
10871136 )
10881137 self .list = async_to_raw_response_wrapper (
10891138 floating_ips .list ,
10901139 )
10911140 self .delete = async_to_raw_response_wrapper (
10921141 floating_ips .delete ,
10931142 )
1094- self .assign = async_to_raw_response_wrapper (
1095- floating_ips .assign ,
1143+ self .assign = ( # pyright: ignore[reportDeprecated]
1144+ async_to_raw_response_wrapper (
1145+ floating_ips .assign , # pyright: ignore[reportDeprecated],
1146+ )
10961147 )
10971148 self .get = async_to_raw_response_wrapper (
10981149 floating_ips .get ,
10991150 )
1100- self .unassign = async_to_raw_response_wrapper (
1101- floating_ips .unassign ,
1151+ self .unassign = ( # pyright: ignore[reportDeprecated]
1152+ async_to_raw_response_wrapper (
1153+ floating_ips .unassign , # pyright: ignore[reportDeprecated],
1154+ )
11021155 )
11031156 self .create_and_poll = async_to_raw_response_wrapper (
11041157 floating_ips .create_and_poll ,
@@ -1115,23 +1168,29 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
11151168 self .create = to_streamed_response_wrapper (
11161169 floating_ips .create ,
11171170 )
1118- self .update = to_streamed_response_wrapper (
1119- floating_ips .update ,
1171+ self .update = ( # pyright: ignore[reportDeprecated]
1172+ to_streamed_response_wrapper (
1173+ floating_ips .update , # pyright: ignore[reportDeprecated],
1174+ )
11201175 )
11211176 self .list = to_streamed_response_wrapper (
11221177 floating_ips .list ,
11231178 )
11241179 self .delete = to_streamed_response_wrapper (
11251180 floating_ips .delete ,
11261181 )
1127- self .assign = to_streamed_response_wrapper (
1128- floating_ips .assign ,
1182+ self .assign = ( # pyright: ignore[reportDeprecated]
1183+ to_streamed_response_wrapper (
1184+ floating_ips .assign , # pyright: ignore[reportDeprecated],
1185+ )
11291186 )
11301187 self .get = to_streamed_response_wrapper (
11311188 floating_ips .get ,
11321189 )
1133- self .unassign = to_streamed_response_wrapper (
1134- floating_ips .unassign ,
1190+ self .unassign = ( # pyright: ignore[reportDeprecated]
1191+ to_streamed_response_wrapper (
1192+ floating_ips .unassign , # pyright: ignore[reportDeprecated],
1193+ )
11351194 )
11361195 self .create_and_poll = to_streamed_response_wrapper (
11371196 floating_ips .create_and_poll ,
@@ -1148,23 +1207,29 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
11481207 self .create = async_to_streamed_response_wrapper (
11491208 floating_ips .create ,
11501209 )
1151- self .update = async_to_streamed_response_wrapper (
1152- floating_ips .update ,
1210+ self .update = ( # pyright: ignore[reportDeprecated]
1211+ async_to_streamed_response_wrapper (
1212+ floating_ips .update , # pyright: ignore[reportDeprecated],
1213+ )
11531214 )
11541215 self .list = async_to_streamed_response_wrapper (
11551216 floating_ips .list ,
11561217 )
11571218 self .delete = async_to_streamed_response_wrapper (
11581219 floating_ips .delete ,
11591220 )
1160- self .assign = async_to_streamed_response_wrapper (
1161- floating_ips .assign ,
1221+ self .assign = ( # pyright: ignore[reportDeprecated]
1222+ async_to_streamed_response_wrapper (
1223+ floating_ips .assign , # pyright: ignore[reportDeprecated],
1224+ )
11621225 )
11631226 self .get = async_to_streamed_response_wrapper (
11641227 floating_ips .get ,
11651228 )
1166- self .unassign = async_to_streamed_response_wrapper (
1167- floating_ips .unassign ,
1229+ self .unassign = ( # pyright: ignore[reportDeprecated]
1230+ async_to_streamed_response_wrapper (
1231+ floating_ips .unassign , # pyright: ignore[reportDeprecated],
1232+ )
11681233 )
11691234 self .create_and_poll = async_to_streamed_response_wrapper (
11701235 floating_ips .create_and_poll ,
0 commit comments