Skip to content

Commit c9079e1

Browse files
feat(api): aggregated API specs update
1 parent b999f2c commit c9079e1

12 files changed

Lines changed: 303 additions & 266 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 645
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-36fec914a660e4aed152e362142d2fe077581b95d0e58090482782a5c9ce8158.yml
3-
openapi_spec_hash: e28d5be17096b3b9d6ac6bb9ce2f67b2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-e9a785e8a6bbd2cae2f832823f8e5928511002996aa1817d56b2e32f4650f53b.yml
3+
openapi_spec_hash: faff7fa65733f0b1aebdfb75d63d398c
44
config_hash: 59388520da4ff5c0c55372621be2a8bb

src/gcore/resources/cdn/cdn_resources/cdn_resources.py

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ def create(
8080
self,
8181
*,
8282
cname: str,
83-
origin: str,
84-
origin_group: int,
8583
active: bool | Omit = omit,
8684
description: str | Omit = omit,
8785
name: Optional[str] | Omit = omit,
8886
options: cdn_resource_create_params.Options | Omit = omit,
87+
origin: str | Omit = omit,
88+
origin_group: int | Omit = omit,
8989
origin_protocol: Literal["HTTP", "HTTPS", "MATCH"] | Omit = omit,
9090
primary_resource: Optional[int] | Omit = omit,
9191
proxy_ssl_ca: Optional[int] | Omit = omit,
@@ -110,14 +110,6 @@ def create(
110110
111111
Delivery domains should be added to your DNS settings.
112112
113-
origin: IP address or domain name of the origin and the port, if custom port is used.
114-
115-
You can use either the `origin` or `originGroup` parameter in the request.
116-
117-
origin_group: Origin group ID with which the CDN resource is associated.
118-
119-
You can use either the `origin` or `originGroup` parameter in the request.
120-
121113
active: Enables or disables a CDN resource.
122114
123115
Possible values:
@@ -134,6 +126,16 @@ def create(
134126
In case of `null` value the option is not added to the CDN resource. Option may
135127
inherit its value from the global account settings.
136128
129+
origin: IP address or domain name of the origin and the port, if custom port is used.
130+
131+
Exactly one of `origin` or `originGroup` must be provided during resource
132+
creation.
133+
134+
origin_group: Origin group ID with which the CDN resource is associated.
135+
136+
Exactly one of `origin` or `originGroup` must be provided during resource
137+
creation.
138+
137139
origin_protocol: Protocol used by CDN servers to request content from an origin source.
138140
139141
Possible values:
@@ -204,12 +206,12 @@ def create(
204206
body=maybe_transform(
205207
{
206208
"cname": cname,
207-
"origin": origin,
208-
"origin_group": origin_group,
209209
"active": active,
210210
"description": description,
211211
"name": name,
212212
"options": options,
213+
"origin": origin,
214+
"origin_group": origin_group,
213215
"origin_protocol": origin_protocol,
214216
"primary_resource": primary_resource,
215217
"proxy_ssl_ca": proxy_ssl_ca,
@@ -273,8 +275,6 @@ def update(
273275
274276
origin_group: Origin group ID with which the CDN resource is associated.
275277
276-
You can use either the `origin` or `originGroup` parameter in the request.
277-
278278
origin_protocol: Protocol used by CDN servers to request content from an origin source.
279279
280280
Possible values:
@@ -855,8 +855,6 @@ def replace(
855855
Args:
856856
origin_group: Origin group ID with which the CDN resource is associated.
857857
858-
You can use either the `origin` or `originGroup` parameter in the request.
859-
860858
active: Enables or disables a CDN resource.
861859
862860
Possible values:
@@ -990,12 +988,12 @@ async def create(
990988
self,
991989
*,
992990
cname: str,
993-
origin: str,
994-
origin_group: int,
995991
active: bool | Omit = omit,
996992
description: str | Omit = omit,
997993
name: Optional[str] | Omit = omit,
998994
options: cdn_resource_create_params.Options | Omit = omit,
995+
origin: str | Omit = omit,
996+
origin_group: int | Omit = omit,
999997
origin_protocol: Literal["HTTP", "HTTPS", "MATCH"] | Omit = omit,
1000998
primary_resource: Optional[int] | Omit = omit,
1001999
proxy_ssl_ca: Optional[int] | Omit = omit,
@@ -1020,14 +1018,6 @@ async def create(
10201018
10211019
Delivery domains should be added to your DNS settings.
10221020
1023-
origin: IP address or domain name of the origin and the port, if custom port is used.
1024-
1025-
You can use either the `origin` or `originGroup` parameter in the request.
1026-
1027-
origin_group: Origin group ID with which the CDN resource is associated.
1028-
1029-
You can use either the `origin` or `originGroup` parameter in the request.
1030-
10311021
active: Enables or disables a CDN resource.
10321022
10331023
Possible values:
@@ -1044,6 +1034,16 @@ async def create(
10441034
In case of `null` value the option is not added to the CDN resource. Option may
10451035
inherit its value from the global account settings.
10461036
1037+
origin: IP address or domain name of the origin and the port, if custom port is used.
1038+
1039+
Exactly one of `origin` or `originGroup` must be provided during resource
1040+
creation.
1041+
1042+
origin_group: Origin group ID with which the CDN resource is associated.
1043+
1044+
Exactly one of `origin` or `originGroup` must be provided during resource
1045+
creation.
1046+
10471047
origin_protocol: Protocol used by CDN servers to request content from an origin source.
10481048
10491049
Possible values:
@@ -1114,12 +1114,12 @@ async def create(
11141114
body=await async_maybe_transform(
11151115
{
11161116
"cname": cname,
1117-
"origin": origin,
1118-
"origin_group": origin_group,
11191117
"active": active,
11201118
"description": description,
11211119
"name": name,
11221120
"options": options,
1121+
"origin": origin,
1122+
"origin_group": origin_group,
11231123
"origin_protocol": origin_protocol,
11241124
"primary_resource": primary_resource,
11251125
"proxy_ssl_ca": proxy_ssl_ca,
@@ -1183,8 +1183,6 @@ async def update(
11831183
11841184
origin_group: Origin group ID with which the CDN resource is associated.
11851185
1186-
You can use either the `origin` or `originGroup` parameter in the request.
1187-
11881186
origin_protocol: Protocol used by CDN servers to request content from an origin source.
11891187
11901188
Possible values:
@@ -1765,8 +1763,6 @@ async def replace(
17651763
Args:
17661764
origin_group: Origin group ID with which the CDN resource is associated.
17671765
1768-
You can use either the `origin` or `originGroup` parameter in the request.
1769-
17701766
active: Enables or disables a CDN resource.
17711767
17721768
Possible values:

src/gcore/resources/cloud/floating_ips.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,10 @@ def assign(
382382
timeout: float | httpx.Timeout | None | NotGiven = not_given,
383383
) -> FloatingIP:
384384
"""
385-
Assign floating IP to instance or loadbalancer
385+
Assign floating IP to instance or loadbalancer.
386386
387-
**Deprecated**: Use PATCH
388-
/v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
387+
**Deprecated**: Use
388+
`PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
389389
390390
Args:
391391
project_id: Project ID
@@ -487,8 +487,8 @@ def unassign(
487487
timeout: float | httpx.Timeout | None | NotGiven = not_given,
488488
) -> FloatingIP:
489489
"""
490-
**Deprecated**: Use PATCH
491-
/v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
490+
**Deprecated**: Use
491+
`PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
492492
493493
Args:
494494
project_id: Project ID
@@ -1005,10 +1005,10 @@ async def assign(
10051005
timeout: float | httpx.Timeout | None | NotGiven = not_given,
10061006
) -> FloatingIP:
10071007
"""
1008-
Assign floating IP to instance or loadbalancer
1008+
Assign floating IP to instance or loadbalancer.
10091009
1010-
**Deprecated**: Use PATCH
1011-
/v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
1010+
**Deprecated**: Use
1011+
`PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
10121012
10131013
Args:
10141014
project_id: Project ID
@@ -1110,8 +1110,8 @@ async def unassign(
11101110
timeout: float | httpx.Timeout | None | NotGiven = not_given,
11111111
) -> FloatingIP:
11121112
"""
1113-
**Deprecated**: Use PATCH
1114-
/v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
1113+
**Deprecated**: Use
1114+
`PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
11151115
11161116
Args:
11171117
project_id: Project ID

src/gcore/resources/cloud/load_balancers/load_balancers.py

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import typing_extensions
56
from typing import Dict, Iterable, Optional
67
from typing_extensions import Literal
78

@@ -238,6 +239,7 @@ def create(
238239
cast_to=TaskIDList,
239240
)
240241

242+
@typing_extensions.deprecated("deprecated")
241243
def update(
242244
self,
243245
load_balancer_id: str,
@@ -261,6 +263,9 @@ def update(
261263
that are provided in the request body. Any fields that are not included will
262264
remain unchanged.
263265
266+
Please use PATCH `/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}`
267+
instead
268+
264269
Args:
265270
project_id: Project ID
266271
@@ -986,6 +991,7 @@ async def create(
986991
cast_to=TaskIDList,
987992
)
988993

994+
@typing_extensions.deprecated("deprecated")
989995
async def update(
990996
self,
991997
load_balancer_id: str,
@@ -1009,6 +1015,9 @@ async def update(
10091015
that are provided in the request body. Any fields that are not included will
10101016
remain unchanged.
10111017
1018+
Please use PATCH `/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}`
1019+
instead
1020+
10121021
Args:
10131022
project_id: Project ID
10141023
@@ -1591,8 +1600,10 @@ def __init__(self, load_balancers: LoadBalancersResource) -> None:
15911600
self.create = to_raw_response_wrapper(
15921601
load_balancers.create,
15931602
)
1594-
self.update = to_raw_response_wrapper(
1595-
load_balancers.update,
1603+
self.update = ( # pyright: ignore[reportDeprecated]
1604+
to_raw_response_wrapper(
1605+
load_balancers.update, # pyright: ignore[reportDeprecated],
1606+
)
15961607
)
15971608
self.list = to_raw_response_wrapper(
15981609
load_balancers.list,
@@ -1654,8 +1665,10 @@ def __init__(self, load_balancers: AsyncLoadBalancersResource) -> None:
16541665
self.create = async_to_raw_response_wrapper(
16551666
load_balancers.create,
16561667
)
1657-
self.update = async_to_raw_response_wrapper(
1658-
load_balancers.update,
1668+
self.update = ( # pyright: ignore[reportDeprecated]
1669+
async_to_raw_response_wrapper(
1670+
load_balancers.update, # pyright: ignore[reportDeprecated],
1671+
)
16591672
)
16601673
self.list = async_to_raw_response_wrapper(
16611674
load_balancers.list,
@@ -1717,8 +1730,10 @@ def __init__(self, load_balancers: LoadBalancersResource) -> None:
17171730
self.create = to_streamed_response_wrapper(
17181731
load_balancers.create,
17191732
)
1720-
self.update = to_streamed_response_wrapper(
1721-
load_balancers.update,
1733+
self.update = ( # pyright: ignore[reportDeprecated]
1734+
to_streamed_response_wrapper(
1735+
load_balancers.update, # pyright: ignore[reportDeprecated],
1736+
)
17221737
)
17231738
self.list = to_streamed_response_wrapper(
17241739
load_balancers.list,
@@ -1780,8 +1795,10 @@ def __init__(self, load_balancers: AsyncLoadBalancersResource) -> None:
17801795
self.create = async_to_streamed_response_wrapper(
17811796
load_balancers.create,
17821797
)
1783-
self.update = async_to_streamed_response_wrapper(
1784-
load_balancers.update,
1798+
self.update = ( # pyright: ignore[reportDeprecated]
1799+
async_to_streamed_response_wrapper(
1800+
load_balancers.update, # pyright: ignore[reportDeprecated],
1801+
)
17851802
)
17861803
self.list = async_to_streamed_response_wrapper(
17871804
load_balancers.list,

0 commit comments

Comments
 (0)