Skip to content

Commit 8469462

Browse files
feat(api): aggregated API specs update
1 parent 2c780f3 commit 8469462

9 files changed

Lines changed: 32 additions & 25 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: 618
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-c358b756aa348a1c6a982fa7af3c5134289f9951a0b2e348d5c5d796cd68a9b9.yml
3-
openapi_spec_hash: 8f53b4d77c357ba5d34d47ec447ec57b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-c98c3c0bf29fd07be3ff871bfac3cdc39c55c353207b7b33c6c448ab4f4cc845.yml
3+
openapi_spec_hash: d77a4fabd08324c4e401d0d50c9a13c7
44
config_hash: db560bc3873a6441828babf34ae5f184

src/gcore/resources/security/bgp_announces.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def list(
4848
self,
4949
*,
5050
announced: Optional[bool] | Omit = omit,
51-
client_id: Optional[int] | Omit = omit,
5251
origin: Optional[Literal["STATIC", "DYNAMIC"]] | Omit = omit,
5352
site: Optional[str] | Omit = omit,
5453
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -83,7 +82,6 @@ def list(
8382
query=maybe_transform(
8483
{
8584
"announced": announced,
86-
"client_id": client_id,
8785
"origin": origin,
8886
"site": site,
8987
},
@@ -165,7 +163,6 @@ async def list(
165163
self,
166164
*,
167165
announced: Optional[bool] | Omit = omit,
168-
client_id: Optional[int] | Omit = omit,
169166
origin: Optional[Literal["STATIC", "DYNAMIC"]] | Omit = omit,
170167
site: Optional[str] | Omit = omit,
171168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -200,7 +197,6 @@ async def list(
200197
query=await async_maybe_transform(
201198
{
202199
"announced": announced,
203-
"client_id": client_id,
204200
"origin": origin,
205201
"site": site,
206202
},

src/gcore/resources/security/profiles.py

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

33
from __future__ import annotations
44

5-
from typing import Iterable, Optional
5+
from typing import Iterable
66

77
import httpx
88

@@ -55,7 +55,7 @@ def create(
5555
fields: Iterable[profile_create_params.Field],
5656
profile_template: int,
5757
site: str,
58-
ip_address: Optional[str] | Omit = omit,
58+
ip_address: str | Omit = omit,
5959
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6060
# The extra values given here take precedence over values defined on the client or passed to this method.
6161
extra_headers: Headers | None = None,
@@ -69,6 +69,8 @@ def create(
6969
created
7070
7171
Args:
72+
ip_address: Required for Universal template only. Optional for all others.
73+
7274
extra_headers: Send extra headers
7375
7476
extra_query: Add additional query parameters to the request
@@ -212,7 +214,7 @@ def recreate(
212214
*,
213215
fields: Iterable[profile_recreate_params.Field],
214216
profile_template: int,
215-
ip_address: Optional[str] | Omit = omit,
217+
ip_address: str | Omit = omit,
216218
site: str | Omit = omit,
217219
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
218220
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -225,6 +227,8 @@ def recreate(
225227
Recreate profile with another profile template (for other cases use detail API)
226228
227229
Args:
230+
ip_address: Required for Universal template only. Optional for all others.
231+
228232
extra_headers: Send extra headers
229233
230234
extra_query: Add additional query parameters to the request
@@ -256,7 +260,7 @@ def replace(
256260
*,
257261
fields: Iterable[profile_replace_params.Field],
258262
profile_template: int,
259-
ip_address: Optional[str] | Omit = omit,
263+
ip_address: str | Omit = omit,
260264
site: str | Omit = omit,
261265
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262266
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -271,6 +275,8 @@ def replace(
271275
updated
272276
273277
Args:
278+
ip_address: Required for Universal template only. Optional for all others.
279+
274280
extra_headers: Send extra headers
275281
276282
extra_query: Add additional query parameters to the request
@@ -323,7 +329,7 @@ async def create(
323329
fields: Iterable[profile_create_params.Field],
324330
profile_template: int,
325331
site: str,
326-
ip_address: Optional[str] | Omit = omit,
332+
ip_address: str | Omit = omit,
327333
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
328334
# The extra values given here take precedence over values defined on the client or passed to this method.
329335
extra_headers: Headers | None = None,
@@ -337,6 +343,8 @@ async def create(
337343
created
338344
339345
Args:
346+
ip_address: Required for Universal template only. Optional for all others.
347+
340348
extra_headers: Send extra headers
341349
342350
extra_query: Add additional query parameters to the request
@@ -480,7 +488,7 @@ async def recreate(
480488
*,
481489
fields: Iterable[profile_recreate_params.Field],
482490
profile_template: int,
483-
ip_address: Optional[str] | Omit = omit,
491+
ip_address: str | Omit = omit,
484492
site: str | Omit = omit,
485493
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
486494
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -493,6 +501,8 @@ async def recreate(
493501
Recreate profile with another profile template (for other cases use detail API)
494502
495503
Args:
504+
ip_address: Required for Universal template only. Optional for all others.
505+
496506
extra_headers: Send extra headers
497507
498508
extra_query: Add additional query parameters to the request
@@ -524,7 +534,7 @@ async def replace(
524534
*,
525535
fields: Iterable[profile_replace_params.Field],
526536
profile_template: int,
527-
ip_address: Optional[str] | Omit = omit,
537+
ip_address: str | Omit = omit,
528538
site: str | Omit = omit,
529539
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
530540
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -539,6 +549,8 @@ async def replace(
539549
updated
540550
541551
Args:
552+
ip_address: Required for Universal template only. Optional for all others.
553+
542554
extra_headers: Send extra headers
543555
544556
extra_query: Add additional query parameters to the request

src/gcore/types/security/bgp_announce_list_params.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
class BgpAnnounceListParams(TypedDict, total=False):
1212
announced: Optional[bool]
1313

14-
client_id: Optional[int]
15-
1614
origin: Optional[Literal["STATIC", "DYNAMIC"]]
1715

1816
site: Optional[str]

src/gcore/types/security/profile_create_params.py

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

33
from __future__ import annotations
44

5-
from typing import Iterable, Optional
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["ProfileCreateParams", "Field"]
@@ -15,7 +15,8 @@ class ProfileCreateParams(TypedDict, total=False):
1515

1616
site: Required[str]
1717

18-
ip_address: Optional[str]
18+
ip_address: str
19+
"""Required for Universal template only. Optional for all others."""
1920

2021

2122
class Field(TypedDict, total=False):

src/gcore/types/security/profile_recreate_params.py

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

33
from __future__ import annotations
44

5-
from typing import Iterable, Optional
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["ProfileRecreateParams", "Field"]
@@ -13,7 +13,8 @@ class ProfileRecreateParams(TypedDict, total=False):
1313

1414
profile_template: Required[int]
1515

16-
ip_address: Optional[str]
16+
ip_address: str
17+
"""Required for Universal template only. Optional for all others."""
1718

1819
site: str
1920

src/gcore/types/security/profile_replace_params.py

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

33
from __future__ import annotations
44

5-
from typing import Iterable, Optional
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["ProfileReplaceParams", "Field"]
@@ -13,7 +13,8 @@ class ProfileReplaceParams(TypedDict, total=False):
1313

1414
profile_template: Required[int]
1515

16-
ip_address: Optional[str]
16+
ip_address: str
17+
"""Required for Universal template only. Optional for all others."""
1718

1819
site: str
1920

tests/api_resources/security/test_bgp_announces.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_method_list(self, client: Gcore) -> None:
2626
def test_method_list_with_all_params(self, client: Gcore) -> None:
2727
bgp_announce = client.security.bgp_announces.list(
2828
announced=True,
29-
client_id=0,
3029
origin="STATIC",
3130
site="x",
3231
)
@@ -110,7 +109,6 @@ async def test_method_list(self, async_client: AsyncGcore) -> None:
110109
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
111110
bgp_announce = await async_client.security.bgp_announces.list(
112111
announced=True,
113-
client_id=0,
114112
origin="STATIC",
115113
site="x",
116114
)

tests/api_resources/security/test_profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_method_list_with_all_params(self, client: Gcore) -> None:
8383
exclude_empty_address=True,
8484
include_deleted=True,
8585
ip_address="ip_address",
86-
site="site",
86+
site="ED",
8787
)
8888
assert_matches_type(ProfileListResponse, profile, path=["response"])
8989

@@ -344,7 +344,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> No
344344
exclude_empty_address=True,
345345
include_deleted=True,
346346
ip_address="ip_address",
347-
site="site",
347+
site="ED",
348348
)
349349
assert_matches_type(ProfileListResponse, profile, path=["response"])
350350

0 commit comments

Comments
 (0)