Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
cf790ab
codegen metadata
stainless-app[bot] Apr 3, 2026
7c4c5ae
codegen metadata
stainless-app[bot] Apr 3, 2026
5c8e960
codegen metadata
stainless-app[bot] Apr 3, 2026
a854caa
codegen metadata
stainless-app[bot] Apr 3, 2026
846057c
codegen metadata
stainless-app[bot] Apr 3, 2026
4cfc51d
codegen metadata
stainless-app[bot] Apr 3, 2026
01ceac1
codegen metadata
stainless-app[bot] Apr 3, 2026
a656459
codegen metadata
stainless-app[bot] Apr 4, 2026
414312e
codegen metadata
stainless-app[bot] Apr 4, 2026
3a306ba
codegen metadata
stainless-app[bot] Apr 4, 2026
66bf2a9
codegen metadata
stainless-app[bot] Apr 4, 2026
c14e1aa
codegen metadata
stainless-app[bot] Apr 4, 2026
405dea7
codegen metadata
stainless-app[bot] Apr 4, 2026
cdcd2b5
codegen metadata
stainless-app[bot] Apr 4, 2026
37bba38
codegen metadata
stainless-app[bot] Apr 4, 2026
d3b7d8d
codegen metadata
stainless-app[bot] Apr 4, 2026
25098b3
codegen metadata
stainless-app[bot] Apr 4, 2026
7fba7fa
codegen metadata
stainless-app[bot] Apr 4, 2026
df9f464
codegen metadata
stainless-app[bot] Apr 4, 2026
7b582c9
codegen metadata
stainless-app[bot] Apr 5, 2026
5e950a5
codegen metadata
stainless-app[bot] Apr 5, 2026
2e24a21
codegen metadata
stainless-app[bot] Apr 5, 2026
afe0de9
codegen metadata
stainless-app[bot] Apr 5, 2026
a618095
codegen metadata
stainless-app[bot] Apr 5, 2026
7172a9c
codegen metadata
stainless-app[bot] Apr 5, 2026
e4bfcc4
codegen metadata
stainless-app[bot] Apr 5, 2026
9b26ab9
codegen metadata
stainless-app[bot] Apr 5, 2026
8e54193
codegen metadata
stainless-app[bot] Apr 5, 2026
c05f2b1
codegen metadata
stainless-app[bot] Apr 5, 2026
166071b
codegen metadata
stainless-app[bot] Apr 5, 2026
c3abdf2
codegen metadata
stainless-app[bot] Apr 5, 2026
fdd5891
codegen metadata
stainless-app[bot] Apr 6, 2026
6c9c75a
codegen metadata
stainless-app[bot] Apr 6, 2026
82ae6d5
codegen metadata
stainless-app[bot] Apr 6, 2026
d535a31
codegen metadata
stainless-app[bot] Apr 6, 2026
0fdabd2
codegen metadata
stainless-app[bot] Apr 6, 2026
ebb3210
codegen metadata
stainless-app[bot] Apr 6, 2026
124c704
feat(api): aggregated API specs update
stainless-app[bot] Apr 6, 2026
f263699
feat(api): aggregated API specs update
stainless-app[bot] Apr 6, 2026
c72a09b
codegen metadata
stainless-app[bot] Apr 6, 2026
bad8073
codegen metadata
stainless-app[bot] Apr 6, 2026
7380dbb
codegen metadata
stainless-app[bot] Apr 6, 2026
869ae55
codegen metadata
stainless-app[bot] Apr 6, 2026
1a8f947
codegen metadata
stainless-app[bot] Apr 7, 2026
1a583e5
codegen metadata
stainless-app[bot] Apr 7, 2026
046ee0b
codegen metadata
stainless-app[bot] Apr 7, 2026
451bb3e
codegen metadata
stainless-app[bot] Apr 7, 2026
e9d34ea
codegen metadata
stainless-app[bot] Apr 7, 2026
4c84804
codegen metadata
stainless-app[bot] Apr 7, 2026
58ddc52
codegen metadata
stainless-app[bot] Apr 7, 2026
598edae
refactor(cloud): split instance and baremetal image models
stainless-app[bot] Apr 7, 2026
2f9b739
fix(examples): update baremetal image examples to use BaremetalImage …
pedrodeoliveira Apr 7, 2026
3f4d832
fix(dns): update network-mappings get_by_name to new endpoint path
stainless-app[bot] Apr 7, 2026
141a927
feat(api): fix(cdn): harmonize pagination across CDN list endpoints
stainless-app[bot] Apr 7, 2026
6ab83c7
codegen metadata
stainless-app[bot] Apr 7, 2026
ecc43d5
fix(client): preserve hardcoded query params when merging with user p…
stainless-app[bot] Apr 7, 2026
614d3ad
codegen metadata
stainless-app[bot] Apr 7, 2026
d7ff7af
codegen metadata
stainless-app[bot] Apr 7, 2026
f4ce746
codegen metadata
stainless-app[bot] Apr 7, 2026
9512085
codegen metadata
stainless-app[bot] Apr 7, 2026
3731830
codegen metadata
stainless-app[bot] Apr 7, 2026
cb0b82f
codegen metadata
stainless-app[bot] Apr 8, 2026
1a01799
codegen metadata
stainless-app[bot] Apr 8, 2026
274b2f8
codegen metadata
stainless-app[bot] Apr 8, 2026
fd5f4f9
codegen metadata
stainless-app[bot] Apr 8, 2026
6bab3d6
feat(api): aggregated API specs update
stainless-app[bot] Apr 8, 2026
d4ecdec
codegen metadata
stainless-app[bot] Apr 8, 2026
80d8d7c
codegen metadata
stainless-app[bot] Apr 8, 2026
295e5d3
feat(api): aggregated API specs update
stainless-app[bot] Apr 8, 2026
2d956ac
codegen metadata
stainless-app[bot] Apr 8, 2026
187181c
codegen metadata
stainless-app[bot] Apr 8, 2026
f19a84a
codegen metadata
stainless-app[bot] Apr 8, 2026
c6ee4a6
codegen metadata
stainless-app[bot] Apr 8, 2026
4ec0e55
codegen metadata
stainless-app[bot] Apr 9, 2026
b4609eb
codegen metadata
stainless-app[bot] Apr 9, 2026
1ced30c
codegen metadata
stainless-app[bot] Apr 9, 2026
cfd1bba
codegen metadata
stainless-app[bot] Apr 9, 2026
bccf2db
codegen metadata
stainless-app[bot] Apr 9, 2026
2c69764
codegen metadata
stainless-app[bot] Apr 9, 2026
294294c
codegen metadata
stainless-app[bot] Apr 9, 2026
af2e161
codegen metadata
stainless-app[bot] Apr 9, 2026
bb598f8
codegen metadata
stainless-app[bot] Apr 9, 2026
e3d498f
codegen metadata
stainless-app[bot] Apr 9, 2026
32a4dfc
codegen metadata
stainless-app[bot] Apr 9, 2026
bb45e4c
codegen metadata
stainless-app[bot] Apr 9, 2026
1ace6a1
codegen metadata
stainless-app[bot] Apr 9, 2026
bc5738a
codegen metadata
stainless-app[bot] Apr 10, 2026
1a6ea64
codegen metadata
stainless-app[bot] Apr 10, 2026
ee15866
codegen metadata
stainless-app[bot] Apr 10, 2026
02040d0
release: 0.42.0
stainless-app[bot] Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.41.0"
".": "0.42.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 658
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-e7708c017357421a39e6de2f7141415c93951bbc835742909b0d9d6f0825a318.yml
openapi_spec_hash: 2abb653b57137b808c182cb1e778a429
config_hash: ab6b5443d52ca04e4e0e12def131f8e6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-116f2531a66622ebe27b365b48059ee01e6f933d05b32d25514e7ea55504167b.yml
openapi_spec_hash: e180b0363c2154557489d2fb67c4549d
config_hash: 7b7ec6618b7e15be0feb6d5c053c145e
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.42.0 (2026-04-10)

Full Changelog: [v0.41.0...v0.42.0](https://github.com/G-Core/gcore-python/compare/v0.41.0...v0.42.0)

### Features

* **api:** aggregated API specs update ([295e5d3](https://github.com/G-Core/gcore-python/commit/295e5d3552cc864bfdc57318defbf5ab7183cfbb))
* **api:** aggregated API specs update ([6bab3d6](https://github.com/G-Core/gcore-python/commit/6bab3d65d59f4764bead81dc17108f392acac1bc))
* **api:** aggregated API specs update ([f263699](https://github.com/G-Core/gcore-python/commit/f26369916ffd96331d9dd541caab4fffc25c3575))
* **api:** aggregated API specs update ([124c704](https://github.com/G-Core/gcore-python/commit/124c7043ff615b4548efbd7b92446f749cfadfc3))
* **api:** fix(cdn): harmonize pagination across CDN list endpoints ([141a927](https://github.com/G-Core/gcore-python/commit/141a927d1717eedcbe636db85e76a4d6432e40a1))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([ecc43d5](https://github.com/G-Core/gcore-python/commit/ecc43d55ef651e1ae5e86d19b37ad4e4850fdcc6))
* **dns:** update network-mappings get_by_name to new endpoint path ([3f4d832](https://github.com/G-Core/gcore-python/commit/3f4d832f936e3aa22f6e781b5903759b07719716))
* **examples:** update baremetal image examples to use BaremetalImage type ([2f9b739](https://github.com/G-Core/gcore-python/commit/2f9b73994870d080324cf9443c99814d422ad563))


### Refactors

* **cloud:** split instance and baremetal image models ([598edae](https://github.com/G-Core/gcore-python/commit/598edae2f2154634632a862014b550fb1f80977e))

## 0.41.0 (2026-04-03)

Full Changelog: [v0.40.0...v0.41.0](https://github.com/G-Core/gcore-python/compare/v0.40.0...v0.41.0)
Expand Down
12 changes: 6 additions & 6 deletions examples/cloud/baremetal.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import List

from gcore import Gcore
from gcore.types.cloud.image import Image
from gcore.types.cloud.baremetal_flavor import BaremetalFlavor
from gcore.types.cloud.baremetal.baremetal_image import BaremetalImage
from gcore.types.cloud.baremetal.server_create_params import (
InterfaceCreateBareMetalExternalInterfaceSerializer,
)
Expand Down Expand Up @@ -80,7 +80,7 @@ def list_flavors(*, client: Gcore) -> List[BaremetalFlavor]:
return flavors.results


def list_images(*, client: Gcore) -> List[Image]:
def list_images(*, client: Gcore) -> List[BaremetalImage]:
print("\n=== LIST BAREMETAL IMAGES ===")
images = client.cloud.baremetal.images.list()
_print_image_details(images.results)
Expand Down Expand Up @@ -108,7 +108,7 @@ def _print_flavor_details(flavors: List[BaremetalFlavor]) -> None:
print(f" ... and {len(flavors) - display_count} more flavors")


def _print_image_details(images: List[Image]) -> None:
def _print_image_details(images: List[BaremetalImage]) -> None:
display_count = 3
if len(images) < display_count:
display_count = len(images)
Expand All @@ -133,15 +133,15 @@ def _get_smallest_flavor(flavors: List[BaremetalFlavor]) -> str:
return smallest_flavor.flavor_id


def _get_ubuntu_image(images: List[Image]) -> str:
def _get_ubuntu_image(images: List[BaremetalImage]) -> str:
return _get_os_image(images, "ubuntu")


def _get_debian_image(images: List[Image]) -> str:
def _get_debian_image(images: List[BaremetalImage]) -> str:
return _get_os_image(images, "debian")


def _get_os_image(images: List[Image], os_name: str) -> str:
def _get_os_image(images: List[BaremetalImage], os_name: str) -> str:
os_images = [img for img in images if os_name.lower() in img.name.lower()]
if not os_images:
linux_images = [img for img in images if img.os_type.lower() == "linux"]
Expand Down
12 changes: 6 additions & 6 deletions examples/cloud/baremetal_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from typing import List

from gcore import AsyncGcore
from gcore.types.cloud.image import Image
from gcore.types.cloud.baremetal_flavor import BaremetalFlavor
from gcore.types.cloud.baremetal.baremetal_image import BaremetalImage
from gcore.types.cloud.baremetal.server_create_params import (
InterfaceCreateBareMetalExternalInterfaceSerializer,
)
Expand Down Expand Up @@ -83,7 +83,7 @@ async def list_flavors(*, client: AsyncGcore) -> List[BaremetalFlavor]:
return flavors.results


async def list_images(*, client: AsyncGcore) -> List[Image]:
async def list_images(*, client: AsyncGcore) -> List[BaremetalImage]:
print("\n=== LIST BAREMETAL IMAGES ===")
images = await client.cloud.baremetal.images.list()
_print_image_details(images.results)
Expand Down Expand Up @@ -111,7 +111,7 @@ def _print_flavor_details(flavors: List[BaremetalFlavor]) -> None:
print(f" ... and {len(flavors) - display_count} more flavors")


def _print_image_details(images: List[Image]) -> None:
def _print_image_details(images: List[BaremetalImage]) -> None:
display_count = 3
if len(images) < display_count:
display_count = len(images)
Expand All @@ -136,15 +136,15 @@ def _get_smallest_flavor(flavors: List[BaremetalFlavor]) -> str:
return smallest_flavor.flavor_id


def _get_ubuntu_image(images: List[Image]) -> str:
def _get_ubuntu_image(images: List[BaremetalImage]) -> str:
return _get_os_image(images, "ubuntu")


def _get_debian_image(images: List[Image]) -> str:
def _get_debian_image(images: List[BaremetalImage]) -> str:
return _get_os_image(images, "debian")


def _get_os_image(images: List[Image], os_name: str) -> str:
def _get_os_image(images: List[BaremetalImage], os_name: str) -> str:
os_images = [img for img in images if os_name.lower() in img.name.lower()]
if not os_images:
linux_images = [img for img in images if img.os_type.lower() == "linux"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gcore"
version = "0.41.0"
version = "0.42.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/gcore/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
2 changes: 1 addition & 1 deletion src/gcore/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gcore"
__version__ = "0.41.0" # x-release-please-version
__version__ = "0.42.0" # x-release-please-version
6 changes: 3 additions & 3 deletions src/gcore/resources/cdn/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Methods:

- <code title="post /cdn/resources/{resource_id}/rules">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">create</a>(resource_id, \*\*<a href="src/gcore/types/cdn/cdn_resources/rule_create_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py">CDNResourceRule</a></code>
- <code title="patch /cdn/resources/{resource_id}/rules/{rule_id}">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">update</a>(rule_id, \*, resource_id, \*\*<a href="src/gcore/types/cdn/cdn_resources/rule_update_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py">CDNResourceRule</a></code>
- <code title="get /cdn/resources/{resource_id}/rules">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">list</a>(resource_id, \*\*<a href="src/gcore/types/cdn/cdn_resources/rule_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py">SyncOffsetPage[CDNResourceRule]</a></code>
- <code title="get /cdn/resources/{resource_id}/rules">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">list</a>(resource_id, \*\*<a href="src/gcore/types/cdn/cdn_resources/rule_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule_list.py">CDNResourceRuleList</a></code>
- <code title="delete /cdn/resources/{resource_id}/rules/{rule_id}">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">delete</a>(rule_id, \*, resource_id) -> None</code>
- <code title="get /cdn/resources/{resource_id}/rules/{rule_id}">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">get</a>(rule_id, \*, resource_id) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py">CDNResourceRule</a></code>
- <code title="put /cdn/resources/{resource_id}/rules/{rule_id}">client.cdn.cdn_resources.rules.<a href="./src/gcore/resources/cdn/cdn_resources/rules.py">replace</a>(rule_id, \*, resource_id, \*\*<a href="src/gcore/types/cdn/cdn_resources/rule_replace_params.py">params</a>) -> <a href="./src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py">CDNResourceRule</a></code>
Expand All @@ -84,7 +84,7 @@ from gcore.types.cdn import ShieldListResponse

Methods:

- <code title="get /cdn/shieldingpop_v2">client.cdn.shields.<a href="./src/gcore/resources/cdn/shields.py">list</a>(\*\*<a href="src/gcore/types/cdn/shield_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/shield_list_response.py">SyncOffsetPage[ShieldListResponse]</a></code>
- <code title="get /cdn/shieldingpop_v2">client.cdn.shields.<a href="./src/gcore/resources/cdn/shields.py">list</a>(\*\*<a href="src/gcore/types/cdn/shield_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/shield_list_response.py">ShieldListResponse</a></code>

## OriginGroups

Expand Down Expand Up @@ -115,7 +115,7 @@ Methods:

- <code title="post /cdn/resources/rule_templates">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">create</a>(\*\*<a href="src/gcore/types/cdn/rule_template_create_params.py">params</a>) -> <a href="./src/gcore/types/cdn/rule_template.py">RuleTemplate</a></code>
- <code title="patch /cdn/resources/rule_templates/{rule_template_id}">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">update</a>(rule_template_id, \*\*<a href="src/gcore/types/cdn/rule_template_update_params.py">params</a>) -> <a href="./src/gcore/types/cdn/rule_template.py">RuleTemplate</a></code>
- <code title="get /cdn/resources/rule_templates">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">list</a>(\*\*<a href="src/gcore/types/cdn/rule_template_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/rule_template.py">SyncOffsetPage[RuleTemplate]</a></code>
- <code title="get /cdn/resources/rule_templates">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">list</a>(\*\*<a href="src/gcore/types/cdn/rule_template_list_params.py">params</a>) -> <a href="./src/gcore/types/cdn/rule_template_list.py">RuleTemplateList</a></code>
- <code title="delete /cdn/resources/rule_templates/{rule_template_id}">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">delete</a>(rule_template_id) -> None</code>
- <code title="get /cdn/resources/rule_templates/{rule_template_id}">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">get</a>(rule_template_id) -> <a href="./src/gcore/types/cdn/rule_template.py">RuleTemplate</a></code>
- <code title="put /cdn/resources/rule_templates/{rule_template_id}">client.cdn.rule_templates.<a href="./src/gcore/resources/cdn/rule_templates.py">replace</a>(rule_template_id, \*\*<a href="src/gcore/types/cdn/rule_template_replace_params.py">params</a>) -> <a href="./src/gcore/types/cdn/rule_template.py">RuleTemplate</a></code>
Expand Down
80 changes: 44 additions & 36 deletions src/gcore/resources/cdn/cdn_resources/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing import Any, Optional, cast
from typing_extensions import Literal

import httpx
Expand All @@ -17,10 +17,10 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ....pagination import SyncOffsetPage, AsyncOffsetPage
from ...._base_client import AsyncPaginator, make_request_options
from ...._base_client import make_request_options
from ....types.cdn.cdn_resources import rule_list_params, rule_create_params, rule_update_params, rule_replace_params
from ....types.cdn.cdn_resources.cdn_resource_rule import CDNResourceRule
from ....types.cdn.cdn_resources.cdn_resource_rule_list import CDNResourceRuleList

__all__ = ["RulesResource", "AsyncRulesResource"]

Expand Down Expand Up @@ -272,7 +272,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncOffsetPage[CDNResourceRule]:
) -> CDNResourceRuleList:
"""Get rules list

Args:
Expand All @@ -290,23 +290,27 @@ def list(

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
path_template("/cdn/resources/{resource_id}/rules", resource_id=resource_id),
page=SyncOffsetPage[CDNResourceRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"limit": limit,
"offset": offset,
},
rule_list_params.RuleListParams,
return cast(
CDNResourceRuleList,
self._get(
path_template("/cdn/resources/{resource_id}/rules", resource_id=resource_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"limit": limit,
"offset": offset,
},
rule_list_params.RuleListParams,
),
),
cast_to=cast(
Any, CDNResourceRuleList
), # Union types cannot be passed in as arguments in the type system
),
model=CDNResourceRule,
)

def delete(
Expand Down Expand Up @@ -723,7 +727,7 @@ async def update(
cast_to=CDNResourceRule,
)

def list(
async def list(
self,
resource_id: int,
*,
Expand All @@ -735,7 +739,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[CDNResourceRule, AsyncOffsetPage[CDNResourceRule]]:
) -> CDNResourceRuleList:
"""Get rules list

Args:
Expand All @@ -753,23 +757,27 @@ def list(

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
path_template("/cdn/resources/{resource_id}/rules", resource_id=resource_id),
page=AsyncOffsetPage[CDNResourceRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"limit": limit,
"offset": offset,
},
rule_list_params.RuleListParams,
return cast(
CDNResourceRuleList,
await self._get(
path_template("/cdn/resources/{resource_id}/rules", resource_id=resource_id),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"limit": limit,
"offset": offset,
},
rule_list_params.RuleListParams,
),
),
cast_to=cast(
Any, CDNResourceRuleList
), # Union types cannot be passed in as arguments in the type system
),
model=CDNResourceRule,
)

async def delete(
Expand Down
Loading
Loading