Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions src/cloudflare/resources/addressing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,22 @@
LOADocumentsResourceWithStreamingResponse,
AsyncLOADocumentsResourceWithStreamingResponse,
)
from .regional_hostnames import (
RegionalHostnamesResource,
AsyncRegionalHostnamesResource,
RegionalHostnamesResourceWithRawResponse,
AsyncRegionalHostnamesResourceWithRawResponse,
RegionalHostnamesResourceWithStreamingResponse,
AsyncRegionalHostnamesResourceWithStreamingResponse,
)

__all__ = [
"RegionalHostnamesResource",
"AsyncRegionalHostnamesResource",
"RegionalHostnamesResourceWithRawResponse",
"AsyncRegionalHostnamesResourceWithRawResponse",
"RegionalHostnamesResourceWithStreamingResponse",
"AsyncRegionalHostnamesResourceWithStreamingResponse",
"ServicesResource",
"AsyncServicesResource",
"ServicesResourceWithRawResponse",
Expand Down
32 changes: 32 additions & 0 deletions src/cloudflare/resources/addressing/addressing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,23 @@
AddressMapsResourceWithStreamingResponse,
AsyncAddressMapsResourceWithStreamingResponse,
)
from .regional_hostnames.regional_hostnames import (
RegionalHostnamesResource,
AsyncRegionalHostnamesResource,
RegionalHostnamesResourceWithRawResponse,
AsyncRegionalHostnamesResourceWithRawResponse,
RegionalHostnamesResourceWithStreamingResponse,
AsyncRegionalHostnamesResourceWithStreamingResponse,
)

__all__ = ["AddressingResource", "AsyncAddressingResource"]


class AddressingResource(SyncAPIResource):
@cached_property
def regional_hostnames(self) -> RegionalHostnamesResource:
return RegionalHostnamesResource(self._client)

@cached_property
def services(self) -> ServicesResource:
return ServicesResource(self._client)
Expand Down Expand Up @@ -78,6 +90,10 @@ def with_streaming_response(self) -> AddressingResourceWithStreamingResponse:


class AsyncAddressingResource(AsyncAPIResource):
@cached_property
def regional_hostnames(self) -> AsyncRegionalHostnamesResource:
return AsyncRegionalHostnamesResource(self._client)

@cached_property
def services(self) -> AsyncServicesResource:
return AsyncServicesResource(self._client)
Expand Down Expand Up @@ -118,6 +134,10 @@ class AddressingResourceWithRawResponse:
def __init__(self, addressing: AddressingResource) -> None:
self._addressing = addressing

@cached_property
def regional_hostnames(self) -> RegionalHostnamesResourceWithRawResponse:
return RegionalHostnamesResourceWithRawResponse(self._addressing.regional_hostnames)

@cached_property
def services(self) -> ServicesResourceWithRawResponse:
return ServicesResourceWithRawResponse(self._addressing.services)
Expand All @@ -139,6 +159,10 @@ class AsyncAddressingResourceWithRawResponse:
def __init__(self, addressing: AsyncAddressingResource) -> None:
self._addressing = addressing

@cached_property
def regional_hostnames(self) -> AsyncRegionalHostnamesResourceWithRawResponse:
return AsyncRegionalHostnamesResourceWithRawResponse(self._addressing.regional_hostnames)

@cached_property
def services(self) -> AsyncServicesResourceWithRawResponse:
return AsyncServicesResourceWithRawResponse(self._addressing.services)
Expand All @@ -160,6 +184,10 @@ class AddressingResourceWithStreamingResponse:
def __init__(self, addressing: AddressingResource) -> None:
self._addressing = addressing

@cached_property
def regional_hostnames(self) -> RegionalHostnamesResourceWithStreamingResponse:
return RegionalHostnamesResourceWithStreamingResponse(self._addressing.regional_hostnames)

@cached_property
def services(self) -> ServicesResourceWithStreamingResponse:
return ServicesResourceWithStreamingResponse(self._addressing.services)
Expand All @@ -181,6 +209,10 @@ class AsyncAddressingResourceWithStreamingResponse:
def __init__(self, addressing: AsyncAddressingResource) -> None:
self._addressing = addressing

@cached_property
def regional_hostnames(self) -> AsyncRegionalHostnamesResourceWithStreamingResponse:
return AsyncRegionalHostnamesResourceWithStreamingResponse(self._addressing.regional_hostnames)

@cached_property
def services(self) -> AsyncServicesResourceWithStreamingResponse:
return AsyncServicesResourceWithStreamingResponse(self._addressing.services)
Expand Down
34 changes: 34 additions & 0 deletions src/cloudflare/resources/addressing/api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Addressing

## RegionalHostnames

Types:

```python
from cloudflare.types.addressing import (
RegionalHostnameCreateResponse,
RegionalHostnameListResponse,
RegionalHostnameDeleteResponse,
RegionalHostnameEditResponse,
RegionalHostnameGetResponse,
)
```

Methods:

- <code title="post /zones/{zone_id}/addressing/regional_hostnames">client.addressing.regional_hostnames.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py">create</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/addressing/regional_hostname_create_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/regional_hostname_create_response.py">Optional[RegionalHostnameCreateResponse]</a></code>
- <code title="get /zones/{zone_id}/addressing/regional_hostnames">client.addressing.regional_hostnames.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py">list</a>(\*, zone_id) -> <a href="./src/cloudflare/types/addressing/regional_hostname_list_response.py">SyncSinglePage[RegionalHostnameListResponse]</a></code>
- <code title="delete /zones/{zone_id}/addressing/regional_hostnames/{hostname}">client.addressing.regional_hostnames.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py">delete</a>(hostname, \*, zone_id) -> <a href="./src/cloudflare/types/addressing/regional_hostname_delete_response.py">RegionalHostnameDeleteResponse</a></code>
- <code title="patch /zones/{zone_id}/addressing/regional_hostnames/{hostname}">client.addressing.regional_hostnames.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py">edit</a>(hostname, \*, zone_id, \*\*<a href="src/cloudflare/types/addressing/regional_hostname_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/addressing/regional_hostname_edit_response.py">Optional[RegionalHostnameEditResponse]</a></code>
- <code title="get /zones/{zone_id}/addressing/regional_hostnames/{hostname}">client.addressing.regional_hostnames.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py">get</a>(hostname, \*, zone_id) -> <a href="./src/cloudflare/types/addressing/regional_hostname_get_response.py">Optional[RegionalHostnameGetResponse]</a></code>

### Regions

Types:

```python
from cloudflare.types.addressing.regional_hostnames import RegionListResponse
```

Methods:

- <code title="get /accounts/{account_id}/addressing/regional_hostnames/regions">client.addressing.regional_hostnames.regions.<a href="./src/cloudflare/resources/addressing/regional_hostnames/regions.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/addressing/regional_hostnames/region_list_response.py">SyncSinglePage[RegionListResponse]</a></code>

## Services

Types:
Expand Down
33 changes: 33 additions & 0 deletions src/cloudflare/resources/addressing/regional_hostnames/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .regions import (
RegionsResource,
AsyncRegionsResource,
RegionsResourceWithRawResponse,
AsyncRegionsResourceWithRawResponse,
RegionsResourceWithStreamingResponse,
AsyncRegionsResourceWithStreamingResponse,
)
from .regional_hostnames import (
RegionalHostnamesResource,
AsyncRegionalHostnamesResource,
RegionalHostnamesResourceWithRawResponse,
AsyncRegionalHostnamesResourceWithRawResponse,
RegionalHostnamesResourceWithStreamingResponse,
AsyncRegionalHostnamesResourceWithStreamingResponse,
)

__all__ = [
"RegionsResource",
"AsyncRegionsResource",
"RegionsResourceWithRawResponse",
"AsyncRegionsResourceWithRawResponse",
"RegionsResourceWithStreamingResponse",
"AsyncRegionsResourceWithStreamingResponse",
"RegionalHostnamesResource",
"AsyncRegionalHostnamesResource",
"RegionalHostnamesResourceWithRawResponse",
"AsyncRegionalHostnamesResourceWithRawResponse",
"RegionalHostnamesResourceWithStreamingResponse",
"AsyncRegionalHostnamesResourceWithStreamingResponse",
]
Loading
Loading